Created
June 8, 2018 00:21
-
-
Save ldiego08/56ea9825ab10dc3e2f377d5c76fbed47 to your computer and use it in GitHub Desktop.
State Management - Redux vs MobX vs MST
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
interface HeaderProps { | |
searchBoxProps: SearchBoxProps; | |
} | |
class Header extends Component<HeaderProps> { | |
render() { | |
return ( | |
<div> | |
<SearchBox {...this.props.searchBoxProps} /> | |
</div> | |
); | |
} | |
} |
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
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