Created
May 29, 2019 22:17
-
-
Save bradfordlemley/7d7f02a16c0bf9bf458c8d374e54e081 to your computer and use it in GitHub Desktop.
Simple mapState example
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
import { mapState } from '@stated-library/core'; | |
const todoLib = createTodoLib(); | |
const appState$ = mapState( | |
todoLib.state$, | |
state => ({ | |
addTodo: todoLib.addTodo, | |
allTodos: state.todos, | |
isFetchingTodos: state.isFetching, | |
}) | |
); | |
export {todoLib, appState$}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment