Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Step 2
<script src="../../node_modules/reselect/dist/reselect.js"></script>
<script>
(() => {
const getTodos = (state) => {
return state.todo.todos;
};
const todos = Reselect.createSelector([getTodos],
(todos) => {
return todos;
}
);
const todosUpper = Reselect.createSelector([getTodos],
(todos) => {
return todos.map(t => t.toUpperCase());
}
);
App = window.App || {};
App.select = {
todos,
todosUpper,
};
})();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment