Closed c0debreaker closed 7 years ago
Yes, for the sake of simplicity we don't ship a system-wide store for keeping state between components. You can see that the initial state is set in the constructor of the counter route.
You will want to use something like mobx or redux to keep the state.
Thank you.
It's the first time I've tried this. I wish on terminal, there was an instruction
Open http://localhost:1337 in your browser
. It just said Server listening on port 1337. I wasn't sure if react-universally runs 2 services(a client and api).Anyways, my real question as about the Counter variable. Every time I switch to different different tabs like Home, About, the counter I incremented doesn't keep the value. It always reset it to zero. Is this a bug or this was intentional? I hope it kept the last value so people won't think there is an issue in the code. I really thought it was a bug.