Skip to content

Instantly share code, notes, and snippets.

@greglittlefield-wf
Created June 13, 2017 20:53
Show Gist options
  • Save greglittlefield-wf/b6ceed11007f8db708a7eabddf8edb39 to your computer and use it in GitHub Desktop.
Save greglittlefield-wf/b6ceed11007f8db708a7eabddf8edb39 to your computer and use it in GitHub Desktop.
@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