Hacker News new | ask | show | jobs
by gregkerzhner 2231 days ago
You don't need any of that if you just use React. All you need is `setState()`. All of those extra things you are thinking about are part of Redux, not React. I love Redux, but even just pure React is a huge improvement over UIKit.

UIKit kind of reminds me of Backbone.js - it has some infrastructure but its up to you to build a lot of the tools yourself. You might prefer that personally, but I think the movement of the frontend community from Backbone to React shows that most developers prefer a more full feature solution.

1 comments

> You don't need any of that if you just use React.

You do need it if you use ReactRouter. Otherwise your state will be spread (or duplicated even) across multiple components, and it will be a nightmare to deal with.

Whats stopping you from just importing a plain javascript module that has mutable data on all your screens? You can even write it to local storage on every update to preserve it across app refreshes.

Thats essentially what you have in iOS with your AppState example. There is no need to use a Reactive Store if you just want to share some state between screens.