DEV Community


Posted on

How does Vue.js, Angular, or Ember do data store?

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.

Discussion (2)

nullvoxpopuli profile image
NullVoxPopuli • Edited on

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:

export default class MyComponent extends Component {
  @service store;

  async fetchUsers() {
    return await'user');
Enter fullscreen mode Exit fullscreen mode

and then later down the road when you want to read from the cache, you can'user') for synchronous access to the cache

More information here:

dennisfrijlink profile image
Dennis Frijlink

I have a lot of experience working with Vue.js. For state management in Vue js you can use Vuex (