How does Vue.js, Angular, or Ember do data store? I found React's Redux a bit complicated / messy and have a lot of boilerplates, usually with a lot of selectors after selectors and createSelector(), and tons of reducers.
I know I don't have to use Redux with React, but most projects I have seen (and have to use at work) use Redux.
Top comments (2)
Ember has the library
ember-data
, which handles all relational data for you. It currently only works with REST-based apis ({json:api}
being the best spec in REST for this), but it manages cache / requests / etc for you. No need to configure anything.usage is this:
and then later down the road when you want to read from the cache, you can
this.store.peekAll('user')
for synchronous access to the cacheMore information here: guides.emberjs.com/release/models/
I have a lot of experience working with Vue.js. For state management in Vue js you can use Vuex (vuex.vuejs.org/guide/).