MCPcopy
hub / github.com/ctrlplusb/easy-peasy

github.com/ctrlplusb/easy-peasy @v6.1.1 sqlite

repository ↗ · DeepWiki ↗ · release v6.1.1 ↗
346 symbols 909 edges 167 files 11 documented · 3%
README

 

Vegetarian friendly state for React

 

npm MIT License Codecov

Easy Peasy is an abstraction of Redux, providing a reimagined API that focuses on developer experience. It allows you to quickly and easily manage your state, whilst leveraging the strong architectural guarantees and extensive eco-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

const store = createStore({
  todos: ['Create store', 'Wrap application', 'Use store'],

  addTodo: action((state, payload) => {
    state.todos.push(payload);
  }),
});

Wrap your application

function App() {
  return (
    <StoreProvider store={store}>
      <TodoList />
    </StoreProvider>
  );
}

Use the store

function TodoList() {
  const todos = useStoreState((state) => state.todos);
  const addTodo = useStoreActions((actions) => actions.addTodo);
  return (



      {todos.map((todo, idx) => (


{todo}


      ))}
      <AddTodo onAdd={addTodo} />



  );
}

 

Examples 📚

See the example folder for more examples of how to use easy-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 you have the ability to help contribute towards the continued maintenance and evolution of this library then please consider [becoming a sponsor].

 

Documentation

See the official website for tutorials, docs, recipes, and more.

 

OS Awards Nominee

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

Extension points exported contracts — how you extend this code

Config (Interface)
* @param {boolean} [immer=true] - If true, the action will be wrapped in an immer produce call. Otherwise, the action wi
index.d.ts
Person (Interface)
* ARRANGE
tests/typescript/generic-model.ts
Todo (Interface)
(no doc)
examples/simple-todo/src/store/model.ts
Props (Interface)
(no doc)
examples/reduxtagram/src/components/post-comment.tsx
ISetupProps (Interface)
(no doc)
examples/kanban/src/utils/test-utils.tsx
Todo (Interface)
(no doc)
examples/nextjs-todo/store/model.ts
Todo (Interface)
(no doc)
examples/react-native-todo/src/store/model.ts
ActionCreator (Interface)
(no doc)
index.d.ts

Core symbols most depended-on inside this repo

action
called by 179
src/helpers.js
createStore
called by 175
src/create-store.js
computed
called by 68
src/helpers.js
thunk
called by 51
src/helpers.js
actionOn
called by 34
src/helpers.js
thunkOn
called by 31
src/helpers.js
effectOn
called by 25
src/helpers.js
persist
called by 22
src/helpers.js

Shape

Function 181
Interface 131
Method 20
Class 14

Languages

TypeScript95%
Java5%

Modules by API surface

tests/typescript/giant-model.ts23 symbols
index.d.ts23 symbols
src/persistence.js16 symbols
src/lib.js15 symbols
tests/typescript/generic-model.ts10 symbols
src/helpers.js10 symbols
src/hooks.js9 symbols
tests/use-store-state.test.js8 symbols
src/create-store.js8 symbols
examples/react-native-todo/android/app/src/main/java/com/reactnativetodo/MainApplication.java8 symbols
tests/store.test.js7 symbols
tests/typescript/create-context-store.tsx6 symbols

Dependencies from manifests, versioned

@babel/cli7.22.9 · 1×
@babel/core7.22.9 · 1×
@babel/eslint-parser7.22.9 · 1×
@babel/node7.22.6 · 1×
@babel/plugin-external-helpers7.22.5 · 1×
@babel/plugin-proposal-object-rest-spread7.20.7 · 1×
@babel/plugin-transform-react-jsx7.22.5 · 1×
@babel/plugin-transform-runtime7.22.9 · 1×
@babel/polyfill7.12.1 · 1×
@babel/preset-env7.22.9 · 1×
@babel/preset-react7.22.5 · 1×
@babel/preset-typescript7.22.5 · 1×

For agents

$ claude mcp add easy-peasy \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact