Skip to content

Instantly share code, notes, and snippets.

@ldiego08
Created June 8, 2018 00:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ldiego08/56ea9825ab10dc3e2f377d5c76fbed47 to your computer and use it in GitHub Desktop.
Save ldiego08/56ea9825ab10dc3e2f377d5c76fbed47 to your computer and use it in GitHub Desktop.
State Management - Redux vs MobX vs MST
interface HeaderProps {
searchBoxProps: SearchBoxProps;
}
class Header extends Component<HeaderProps> {
render() {
return (
<div>
<SearchBox {...this.props.searchBoxProps} />
</div>
);
}
}
interface SearchBoxProps {
query?: string;
isLoading: string;
results: string[];
onSearch?: (query: string) => void;
}
class SearchBox extends Component<SearchBoxProps> {
render() {
// Render the component ..
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment