3 ms·
If you go for React, I would highly recommend Mobx for state management. And create-react-app + yarn eject to get started. CRA is a joy to work with. Mobx is a
by adrianhel 8y ago
If you go for React, I would highly recommend Mobx for state management. And create-react-app + yarn eject to get started. CRA is a joy to work with.
Mobx is a bit more difficult to grok and debug for newcomers than Redux, but it's really really fast, easy to test and requires little boilerplate.
On the other hand you get reactive state management by default in Vue.
If you use Node for the backend I can recommend using Knex for database queries and migrations while using Postgres.
But if your app will be write heavy, you should consider NoSQL. Neo4j looks very promising in this area and Mongodb also works well.
You will have an easier time migrating data and keeping the data in a known, consistent state with an SQL database. So use that unless your app is write heavy.
I also like using Sqlite for smaller apps. Your database is a single file, you can use knex and switch to Postgres if needed.
As for the backend, I recommend using dependency injection and decouple the http layer from the APIs in all cases where it's possible. It makes things easier to test. Personally I rolled my own library (@adrianhelvik/container) for DI in Node.
- TN1ck 8y agoI am currently building a really complex application using Mobx, it’s great! Because of how it works you can do things that are impossible with redux - as the state would take too long to update with redux. I’m also using mobx-state-tree which is like the love child of mobx and redux. Amazing project as well, should be used if you want to have explicit model validation and immutability. I used it to build a history feature - that would have been almost impossible with vanilla mobx.