• Stars
    star
    5,022
  • Rank 7,894 (Top 0.2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 5 years ago
  • Updated 14 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Vegetarian friendly state for React

Β 

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 (
    <div>
      {todos.map((todo, idx) => (
        <div key={idx}>{todo}</div>
      ))}
      <AddTodo onAdd={addTodo} />
    </div>
  );
}

Β 

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.

More Repositories

1

react-sizeme

Make your React Components aware of their width and height!
JavaScript
1,932
star
2

react-universally

A starter kit for universal react applications.
JavaScript
1,699
star
3

react-async-component

Resolve components asynchronously, with support for code splitting and advanced server side rendering use cases.
JavaScript
1,447
star
4

react-tree-walker

Walk a React (or Preact) element tree, executing a "visitor" function against each element.
JavaScript
346
star
5

react-component-queries

Provide props to your React Components based on their Width and/or Height.
JavaScript
183
star
6

react-jobs

Asynchronously resolve data for your components, with support for server side rendering.
JavaScript
167
star
7

react-async-bootstrapper

Execute a bootstrap method on your React/Preact components. Useful for data prefetching and other activities.
JavaScript
118
star
8

code-split-component

Declarative code splitting for your Wepback bundled React projects, with SSR support.
JavaScript
116
star
9

prisma-pg-jest

Example showcasing how to use Prisma + Postgres + Jest, where each test has its own unique DB context
TypeScript
106
star
10

react-virtual-container

Optimise your React apps by only rendering components when in proximity to the viewport.
JavaScript
53
star
11

cra-monorepo

Example of a now 2.0 monorepo containing Create React App and Node Lambdas
TypeScript
52
star
12

vercel-node-server

An unofficial package allowing you to create http.Server instances of your Vercel Node lambdas.
TypeScript
50
star
13

react-injectables

Explicitly inject Components into any part of your React render tree.
JavaScript
43
star
14

easy-peasy-typescript

An example of using Easy Peasy with Typescript
TypeScript
33
star
15

react-universally-skinny

A "when size matters" adaptation of the react-universally boilerplate.
JavaScript
30
star
16

lerna-cola

Superpowers for your Lerna monorepos.
JavaScript
23
star
17

gun-most

Extends gunDB with the ability to chain into most.js observables.
JavaScript
14
star
18

i-theme

A minimalist theme for vscode
12
star
19

preact-compat-hmr

Example HMR with preact, preact-compat and webpack 2.
JavaScript
12
star
20

prisma2-template

A scratchpad for Prisma2
JavaScript
12
star
21

vercel-node-dev

An unofficial development CLI for Vercel applications targeting the Node.js runtime.
TypeScript
10
star
22

npm-library-starter

A starter kit for npm libraries.
JavaScript
9
star
23

vue-zod-form

A composition based API forms helper for Vue 3 projects that utilise TypeScript.
Vue
9
star
24

vue3-typescript-strategy

An example of a sound TS experience in Vue 3 via .tsx files
TypeScript
8
star
25

cinderella

[WIP] A tiny transformation library.
JavaScript
8
star
26

demo-react-async-and-jobs

Demo on how to use react-async-component and react-jobs together in an SSR project.
JavaScript
7
star
27

react-universally-opinionated

[WIP] An opinionated version of React, Universally.
JavaScript
7
star
28

simee

Ultra simple symlinking of local npm packages.
JavaScript
7
star
29

remix-aws-edge

An adapter for running Remix on AWS CloudFront Lambda@Edge
TypeScript
6
star
30

easy-peasy-hot-reload

Easy Peasy hot reloading example
HTML
6
star
31

templatiser

Apply templates to a file tree.
JavaScript
4
star
32

react-hey-fela

Alternative React bindings for Fela
JavaScript
4
star
33

react-app-rewire-modernizr

Adds the modernizr-loader to your react-app-rewired config.
JavaScript
3
star
34

reason-advent-2017

https://adventofcode.com solved using ReasonML
OCaml
2
star
35

code-split-match

A Webpack 2 code splitting Match component for React Router v4.
2
star
36

comickult.holding

RxJS powered holding page for comickult.
JavaScript
2
star
37

flowcheatsheet

An interactive cheat sheet for Facebook's Flow type system.
JavaScript
2
star
38

lerna-cola-sample

A sample application showcasing Lerna Cola
JavaScript
2
star
39

react-app-rewire-css-blocks

Adds support for CSS Blocks to your react-app-rewired config.
JavaScript
2
star
40

react-universally-archive

JavaScript
2
star
41

now-dev-issue

JavaScript
1
star
42

reason-react-gof

[WIP] Conway's Game of Life implemented using ReasonML/Bucklescript/React.
OCaml
1
star
43

sst-cors-example

An example of CORS configuration in the context of a Serverless Stack application.
TypeScript
1
star
44

react-responsive-element

A responsive element component for React web applications.
1
star
45

monilla

A CLI to manage monorepos with predictability and stability.
TypeScript
1
star
46

approachable-fp-in-scala

An Approachable Guide to Functional Programming in Scala
1
star
47

react-router-bundlesize

Debugging react-router bundle size optimisation.
JavaScript
1
star
48

blank

Blank project for fiddling with JS whilst having all the tooling I like
JavaScript
1
star
49

splice

A malleable content management system.
1
star
50

react-fractal-grid

A fractal grid Component set for React.
1
star