V
V
Verstatel30002019-01-29 15:53:56
React
Verstatel3000, 2019-01-29 15:53:56

Why is the component not re-rendered on state change?

Good afternoon! I'm trying to deal with react\redax and
I can't figure out why the component doesn't redraw when the state changes, in this example https://codesandbox.io/s/6zjx66wvxn
because the component is supposed to be redrawn anyway?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
dev null, 2019-01-29
@Verstatel3000

Well, for starters, you wrap it in connect App, and in the provider you use App outside the redax context
https://codesandbox.io/s/8xk6p5y169
In general, there are a lot of problems there :)

A
Andrey Okhotnikov, 2019-01-29
@tsepen

It does not re-render because your state does not change, and your actions do not work. Check how you connect actions to the component, they don't work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question