@risingstack/react-easy-state
Advanced tools
Comparing version 6.2.0 to 6.2.1
{ | ||
"name": "@risingstack/react-easy-state", | ||
"version": "6.2.0", | ||
"version": "6.2.1", | ||
"description": "React state management with a minimal API. Made with ES6 Proxies.", | ||
@@ -116,5 +116,4 @@ "main": "dist/cjs.es6.js", | ||
"engines": { | ||
"node": ">=10.0.0", | ||
"npm": ">=6.9.0" | ||
"node": ">=6.0.0" | ||
} | ||
} |
@@ -8,6 +8,6 @@ <p align="center"> | ||
[![Build](https://img.shields.io/circleci/project/github/RisingStack/react-easy-state/master.svg)](https://circleci.com/gh/RisingStack/react-easy-state/tree/master) [![dependencies Status](https://david-dm.org/RisingStack/react-easy-state/status.svg)](https://david-dm.org/RisingStack/react-easy-state) [![Coverage Status](https://coveralls.io/repos/github/RisingStack/react-easy-state/badge.svg?branch=master&service=github)](https://coveralls.io/github/RisingStack/react-easy-state?branch=master) [![Package size](https://img.shields.io/bundlephobia/minzip/@risingstack/react-easy-state.svg)](https://bundlephobia.com/result?p=@risingstack/react-easy-state) [![Version](https://img.shields.io/npm/v/@risingstack/react-easy-state.svg)](https://www.npmjs.com/package/@risingstack/react-easy-state) [![License](https://img.shields.io/npm/l/@risingstack/react-easy-state.svg)](https://www.npmjs.com/package/@risingstack/react-easy-state) <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --> | ||
[![All Contributors](https://img.shields.io/badge/all_contributors-3-blue.svg)](#contributors) | ||
[![All Contributors](https://img.shields.io/badge/all_contributors-4-blue.svg)](#contributors) | ||
<!-- ALL-CONTRIBUTORS-BADGE:END --> | ||
<a href="#platform-support"><img src="images/browser_support.png" alt="Browser support" width="450px" height="auto" /></a> | ||
<a href="#platform-support-computer"><img src="images/browser_support.png" alt="Browser support" width="450px" height="auto" /></a> | ||
@@ -70,3 +70,3 @@ **NEWS:** `react-easy-state` is moved under `@risingstack/react-easy-state` on npm with **no breaking changes**. Please switch to the new package to get the latest features and bug fixes. Thanks! | ||
Check this [TodoMVC codesandbox](https://codesandbox.io/s/github/RisingStack/react-easy-state/tree/master/examples/todo-mvc?module=%2Fsrc%2FtodosStore.js) or [raw code](/examples/todo-mvc/src/todosStore.js) for a more exciting example with nested data, arrays and computed values. | ||
Check this [TodoMVC codesandbox](https://codesandbox.io/s/github/RisingStack/react-easy-state/tree/master/examples/todo-mvc?module=%2Fsrc%2FtodosStore.js) or [raw code](/examples/todo-mvc/src/todosStore.js) for a more exciting example with nested data, arrays and getter properties. | ||
@@ -122,3 +122,3 @@ ## Installation :cd: | ||
get name() { | ||
return `${user.firstName} ${user.lastName}`; | ||
return `${user.profile.firstName} ${user.profile.lastName}`; | ||
}, | ||
@@ -277,2 +277,4 @@ }, | ||
<p></p> | ||
Every component that is using a store or part of a store inside its render must be wrapped with `view`. Sometimes store usage is not so explicit and easy to to miss. | ||
@@ -301,2 +303,16 @@ ```jsx | ||
If you are **100% sure** that your component is not using any stores you can skip the `view` wrapper. | ||
```jsx | ||
import React from 'react'; | ||
// you don't have to wrap this component with `view` | ||
export default (() => <p>This is just plain text</p>); | ||
``` | ||
`view` wrapping is advised even in these cases though. | ||
- It saves you from future headaches as your project grows and you start to use stores inside these components. | ||
- `view` is pretty much equivalent to `memo` if you don't use any stores. That is nearly always nice to have. | ||
</details> | ||
@@ -493,3 +509,3 @@ <p></p> | ||
const increment = () => counter.num++ | ||
return <button={increment}>{counter.num}</div> | ||
return <button={increment}>{counter.num}</button> | ||
}) | ||
@@ -803,3 +819,3 @@ ``` | ||
- [Clock Widget](https://risingstack.github.io/react-easy-state/examples/clock/build) ([source](/examples/clock/)) ([codesandbox](https://codesandbox.io/s/github/RisingStack/react-easy-state/tree/master/examples/clock)) ([react-native source](/examples/native-clock/)) ([react-native sandbox](https://snack.expo.io/@git/github.com/RisingStack/react-easy-state:examples/native-clock)): a reusable clock widget with a tiny local state store. | ||
- [Stopwatch](https://risingstack.github.io/react-easy-state/examples/stop-watch/build) ([source](/examples/stop-watch/)) ([codesandbox](https://codesandbox.io/s/github/RisingStack/react-easy-state/tree/master/examples/stop-watch)) ([tutorial](https://hackernoon.com/introducing-react-easy-state-1210a156fa16)): a stopwatch with a mix of normal and computed state properties. | ||
- [Stopwatch](https://risingstack.github.io/react-easy-state/examples/stop-watch/build) ([source](/examples/stop-watch/)) ([codesandbox](https://codesandbox.io/s/github/RisingStack/react-easy-state/tree/master/examples/stop-watch)) ([tutorial](https://hackernoon.com/introducing-react-easy-state-1210a156fa16)): a stopwatch with a mix of normal and getter state properties. | ||
@@ -809,3 +825,3 @@ #### Advanced | ||
- [Pokédex](https://risingstack.github.io/react-easy-state/examples/pokedex/build) ([source](/examples/pokedex/)) ([codesandbox](https://codesandbox.io/s/github/RisingStack/react-easy-state/tree/master/examples/pokedex)): a Pokédex app build with Apollo GraphQL, async actions and a global state. | ||
- [TodoMVC](https://risingstack.github.io/react-easy-state/examples/todo-mvc/build) ([source](/examples/todo-mvc/)) ([codesandbox](https://codesandbox.io/s/github/RisingStack/react-easy-state/tree/master/examples/todo-mvc)): a classic TodoMVC implementation with a lot of computed data and implicit reactivity. | ||
- [TodoMVC](https://risingstack.github.io/react-easy-state/examples/todo-mvc/build) ([source](/examples/todo-mvc/)) ([codesandbox](https://codesandbox.io/s/github/RisingStack/react-easy-state/tree/master/examples/todo-mvc)): a classic TodoMVC implementation with a lot of getters/setters and implicit reactivity. | ||
- [Contacts Table](https://risingstack.github.io/react-easy-state/examples/contacts/build) ([source](/examples/contacts/)) ([codesandbox](https://codesandbox.io/s/github/RisingStack/react-easy-state/tree/master/examples/contacts)): a data grid implementation with a mix of global and local state. | ||
@@ -861,5 +877,6 @@ - [Beer Finder](https://risingstack.github.io/react-easy-state/examples/beer-finder/build) ([source](/examples/beer-finder/)) ([codesandbox](https://codesandbox.io/s/github/RisingStack/react-easy-state/tree/master/examples/beer-finder)) ([tutorial](https://medium.com/@solkimicreb/design-patterns-with-react-easy-state-830b927acc7c)): an app with async actions and a mix of local and global state, which finds matching beers for your meal. | ||
<tr> | ||
<td align="center"><a href="https://bertalan-miklos.now.sh/"><img src="https://avatars3.githubusercontent.com/u/6956014?v=4" width="100px;" alt=""/><br /><sub><b>Miklos Bertalan</b></sub></a><br /><a href="https://github.com/RisingStack/@risingstack/react-easy-state/commits?author=solkimicreb" title="Code">💻</a> <a href="https://github.com/RisingStack/@risingstack/react-easy-state/commits?author=solkimicreb" title="Tests">⚠️</a> <a href="https://github.com/RisingStack/@risingstack/react-easy-state/commits?author=solkimicreb" title="Documentation">📖</a> <a href="#blog-solkimicreb" title="Blogposts">📝</a></td> | ||
<td align="center"><a href="https://github.com/rolandszoke"><img src="https://avatars3.githubusercontent.com/u/14181908?v=4" width="100px;" alt=""/><br /><sub><b>Roland</b></sub></a><br /><a href="https://github.com/RisingStack/@risingstack/react-easy-state/commits?author=rolandszoke" title="Code">💻</a> <a href="https://github.com/RisingStack/@risingstack/react-easy-state/commits?author=rolandszoke" title="Tests">⚠️</a> <a href="https://github.com/RisingStack/@risingstack/react-easy-state/commits?author=rolandszoke" title="Documentation">📖</a></td> | ||
<td align="center"><a href="https://github.com/danielgrgly"><img src="https://avatars3.githubusercontent.com/u/22714514?s=460&u=cbbc2326d5f671693a1f33671d9eadad902d5191&v=4" width="100px;" alt=""/><br /><sub><b>Daniel Gergely</b></sub></a><br /><a href="https://github.com/RisingStack/@risingstack/react-easy-state/commits?author=danielgrgly" title="Code">💻</a> <a href="#design-danielgrgly" title="Design">🎨</a> <a href="#example-danielgrgly" title="Examples">💡</a></td> | ||
<td align="center"><a href="https://bertalan-miklos.now.sh/"><img src="https://avatars3.githubusercontent.com/u/6956014?v=4" width="100px;" alt=""/><br /><sub><b>Miklos Bertalan</b></sub></a><br /><a href="https://github.com/RisingStack/react-easy-state/commits?author=solkimicreb" title="Code">💻</a> <a href="https://github.com/RisingStack/react-easy-state/commits?author=solkimicreb" title="Tests">⚠️</a> <a href="https://github.com/RisingStack/react-easy-state/commits?author=solkimicreb" title="Documentation">📖</a> <a href="#blog-solkimicreb" title="Blogposts">📝</a></td> | ||
<td align="center"><a href="https://github.com/rolandszoke"><img src="https://avatars3.githubusercontent.com/u/14181908?v=4" width="100px;" alt=""/><br /><sub><b>Roland</b></sub></a><br /><a href="https://github.com/RisingStack/react-easy-state/commits?author=rolandszoke" title="Code">💻</a> <a href="https://github.com/RisingStack/react-easy-state/commits?author=rolandszoke" title="Tests">⚠️</a> <a href="https://github.com/RisingStack/react-easy-state/commits?author=rolandszoke" title="Documentation">📖</a></td> | ||
<td align="center"><a href="https://github.com/danielgrgly"><img src="https://avatars3.githubusercontent.com/u/22714514?s=460&u=cbbc2326d5f671693a1f33671d9eadad902d5191&v=4" width="100px;" alt=""/><br /><sub><b>Daniel Gergely</b></sub></a><br /><a href="https://github.com/RisingStack/react-easy-state/commits?author=danielgrgly" title="Code">💻</a> <a href="#design-danielgrgly" title="Design">🎨</a> <a href="#example-danielgrgly" title="Examples">💡</a></td> | ||
<td align="center"><a href="https://github.com/peteyycz"><img src="https://avatars1.githubusercontent.com/u/7130689?v=4" width="100px;" alt=""/><br /><sub><b>Peter Czibik</b></sub></a><br /><a href="#infra-peteyycz" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td> | ||
</tr> | ||
@@ -866,0 +883,0 @@ </table> |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
182485
881
0