Skip to content

Instantly share code, notes, and snippets.

@JasonMore
Created August 13, 2021 20:50
Show Gist options
  • Save JasonMore/333d92e8dad4681020491bba5fb18981 to your computer and use it in GitHub Desktop.
Save JasonMore/333d92e8dad4681020491bba5fb18981 to your computer and use it in GitHub Desktop.
carSelectors.js
export const getCars = (state) => state.car.cars;
export const getCarById = (carId) => (state) => getCars(state)[carId];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment