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

Vegetarian friendly state for React

License

NotificationsYou must be signed in to change notification settings

ctrlplusb/easy-peasy

 

Vegetarian friendly state for React

 

npmMIT LicenseCodecov

Easy Peasy is an abstraction of Redux, providing a reimagined API that focuses ondeveloper experience. It allows you toquickly andeasily manage your state, whilst leveraging the strongarchitectural guarantees and extensiveeco-system that Redux has to offer.

  • Zero configuration
  • No boilerplate
  • React hooks based API
  • Extensive TypeScript support
  • Encapsulate data fetching
  • Computed properties
  • Reactive actions
  • Redux middleware support
  • State persistence
  • Redux Dev Tools
  • Global, context, or local stores
  • Built-in testing utils
  • React Native supported
  • Hot reloading supported

 

All of this comes via a single dependency install.

npm install easy-peasy

 

Fly like an eagle 🦅

Create your store

conststore=createStore({todos:['Create store','Wrap application','Use store'],addTodo:action((state,payload)=>{state.todos.push(payload);}),});

Wrap your application

functionApp(){return(<StoreProviderstore={store}><TodoList/></StoreProvider>);}

Use the store

functionTodoList(){consttodos=useStoreState((state)=>state.todos);constaddTodo=useStoreActions((actions)=>actions.addTodo);return(<div>{todos.map((todo,idx)=>(<divkey={idx}>{todo}</div>))}<AddTodoonAdd={addTodo}/></div>);}

 

Examples 📚

See theexample folder for more examples of how to useeasy-peasy.

 

Core Team 🛠


Peter Weinberg

Jørn A. Myrland

Sean Matheson

 

Our Sponsors ❤️

We have only but great appreciation to those who support this project. If youhave the ability to help contribute towards the continued maintenance andevolution of this library then please consider[becoming a sponsor].

 

Documentation

See theofficial website for tutorials, docs, recipes,and more.

 

OS Awards Nominee

Easy Peasy was nominated under the "Productivity Booster" category.

About

Vegetarian friendly state for React

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

    Packages

    No packages published

    Contributors78


    [8]ページ先頭

    ©2009-2025 Movatter.jp