Created
June 13, 2017 20:53
-
-
Save greglittlefield-wf/b6ceed11007f8db708a7eabddf8edb39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Factory() | |
UiFactory<FooProps> Foo; | |
@Props() | |
class FooProps extends UiProps {} | |
@State() | |
class FooState extends UiState { | |
Object stateValue; | |
} | |
@Component() | |
class FooComponent extends UiStatefulComponent<FooProps, FooState> { | |
@override | |
getInitialState() => newState()..stateValue = new TestRetainedClass(); | |
@override | |
componentDidMount() { | |
super.componentWillMount(); | |
setState(newState()..stateValue = null); | |
} | |
@override | |
render() { | |
return Dom.div()(); | |
} | |
} | |
class TestRetainedClass {} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment