Skip to content

Commit

Permalink
docs: Updates README. Welcome @jmyrland!
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlplusb committed Sep 17, 2022
1 parent 5a226ce commit c3e9e80
Showing 1 changed file with 32 additions and 10 deletions.
42 changes: 32 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,17 @@ npm install easy-peasy

<p>&nbsp;</p>

## Fly like an eagle
## Fly like an eagle 🦅

**Create your store**

```javascript
const store = createStore({
todos: {
items: ['Create store', 'Wrap application', 'Use store'],
add: action((state, payload) => {
state.items.push(payload);
}),
},
todos: ['Create store', 'Wrap application', 'Use store'],

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

Expand All @@ -70,21 +69,44 @@ function App() {

```javascript
function TodoList() {
const todos = useStoreState((state) => state.todos.items);
const add = useStoreActions((actions) => actions.todos.add);
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={add} />
<AddTodo onAdd={addTodo} />
</div>
);
}
```

<p>&nbsp;</p>

## Core Team 🛠

<table>
<tr>
<td>
<a href="https://github.com/jmyrland">
<img src="https://avatars.githubusercontent.com/u/837651?v=5" width="100px;" alt=""/>
<br />
<sub><b>Jørn A. Myrland</b></sub>
</a>
</td>
<td>
<a href="https://github.com/ctrlplusb">
<img src="https://avatars.githubusercontent.com/u/12164768?v=4" width="100px;" alt=""/>
<br />
<sub><b>Sean Matheson</b></sub>
</a>
</td>
</tr>
</table>

<p>&nbsp;</p>

## Our Sponsors ❤️

We have only but great appreciation to those who support this project. If you
Expand Down

0 comments on commit c3e9e80

Please sign in to comment.