React dynamic data

how dynamize refresh store.postReducer when data change.
I am obliged refresh my page

maybe with useEffect(but see nobody use ussEffect with state reducer)

(https://github.com/GOANEX32/P7groupomania/blob/main/frontend/src/components/Post/Card.js)
1 Like

If you need help with a single project please try to keep to a single thread. You keep opening up new threads for the same project.


I really think you need to reset and start over. Learn the fundamentals by building simple apps and slowly extend the scope and complexity. I haven’t followed your threads closely but you seem to have started with a project that is too complex to properly learn the technologies it is using.

  • If you do not understand the fundamentals adding complexity isn’t going to help.

  • If you can’t write it without Redux, you can’t write it with Redux.

  • If you can’t write it without a backend, you can’t write it with a backend.

As boring as it might be I would suggest making a full-stack Todo list. It covers all you need to know about React, state management, and CRUD, but it keeps the scope narrow and more simple. A blog is a Todo list (add, delete, update), and so is a shopping cart, so is pretty much 80% of everything at its core. The web is full of Todo lists that just are not called todo lists (CRUD, state management, list rendering).

If it is in redux, then the data coming from useSelector should update automatically and rerender the component.

I agree with lasjorg that you need to take a step back.

Sometimes at work I have some big project with parts I don’t yet understand. So I write a little test app to help me understand the problem better.

I think you need to learn some fundamentals of React and redux first. Then a frontend todo. Then a fullstack todo. Take it slow and learn it well.

That’s just my advice.

ok say me what i should work for this probleme redux ?

Ok say what i should work for this problems,
i should finish this work this month

I’m suggesting that you should put this app aside for a bit and do some simpler react tutorials and some simpler redux tutorials. You are struggling with so many basic concepts. I think you’ll get there faster if you take a step back. Don’t obsess about “this app”, focus on learning. The app will still be there when you’re ready