It's magical! My only pitfall is trying to define the reducer outside the render fn. passing props and state to it, is hard.
-
-
-
Why would you want to put the reducer inside the render function? That breaks the separation of concerns, one of the reasons I use it in the first place, and would be far from optimal create and change the reducer at every render. I use the initfn and initopt, if It needs params
- Još 5 drugih odgovora
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.