Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

179
Views
Why is react-redux required if redux library can be directly used in react?

I was trying to use redux in my react application but I see I can explicitly use redux in my application without using the react-redux library.

const redux = require('redux');

I am wondering then why do we even need react-redux library in our environment? Can someone help me with this?

about 4 years ago · Juan Pablo Isaza
3 answers
Answer question

0

Redux is an UI-library-agnostic state management library. React is a state-management-agnostic UI library.

React-Redux is glue between the two. You don't need it, but you'd have to implement the glue (hooks/HOCs) yourself.

about 4 years ago · Juan Pablo Isaza Report

0

react-redux contains in particular the Provider component and the useDispatch and useSelector hooks. If you are using them, you're using react-redux. If you are not using them, you're missing out a lot, so I suggest you do.

about 4 years ago · Juan Pablo Isaza Report

0

In short:

React-redux is what makes your components rerender when Redux state that is being rendered by your component changes.

Of course you could also do store.getState().foo.bar in your component, but then you would have to track manually when that state changes and rerender your component. Otherwise, it would always stay the same and never update.

If you instead use useSelector(state => state.foo.bar), your component will always rerender when state.foo.bar changes, so you don't have to track that yourself.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!