• Home
  • Recent Q&A
  • Java
  • Cloud
  • JavaScript
  • Python
  • SQL
  • PHP
  • HTML
  • C++
  • Data Science
  • DBMS
  • Devops
  • Hadoop
  • Machine Learning
in React JS by
Q:

  What are Redux selectors and Why to use them?

1 Answer

0 votes
by

Selectors are functions that take Redux state as an argument and return some data to pass to the component. For example, to get user details from the state:

const getUserData = state => state.user.data;

Related questions

0 votes
asked Jun 19, 2020 in React JS by JackTerrance
0 votes
asked Jun 19, 2020 in React JS by JackTerrance
...