Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A set of standard actions and reducers for Redux CRUD Applications

License

NotificationsYou must be signed in to change notification settings

Versent/redux-crud

Repository files navigation

Looking for a new mantainer: See#77

Codeship Status for Versent/redux-crud

Redux CRUD is a convention driven way of building CRUD applications using Redux. After building several Flux applications we found that we always end up creating the same action types, actions and reducers for all our resources.

Redux CRUD gives you a standard set of:

  • action types: e.g.USER_UPDATE_SUCCESS
  • actions: e.g.updateSuccess,updateError
  • reducers: for the action types above e.g.updateSuccess

Working with resources in Redux

When building an app you might have resources likeusers,posts andcomments.

You'll probably end up with action types for them like:

  • USERS_FETCH_SUCCESS
  • POSTS_FETCH_SUCCESS
  • COMMENTS_FETCH_SUCCESS

And action creators like:

  • users.fetchSuccess
  • posts.fetchSuccess
  • comments.fetchSuccess

There's obvious repetition there. Redux CRUD aims to remove this boilerplate by providing strong conventions on naming and processing data.

Stores

Redux-crud provides two stores:

  • List. A plain JS array. This preserves the order of records.
  • Map. A JS object where records are indexed by key. This provides faster writes and lookups.

Docs

Testing

npm test

Example

You can seea basic example here

About

A set of standard actions and reducers for Redux CRUD Applications

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors15


[8]ページ先頭

©2009-2025 Movatter.jp