Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theKashey/beautiful-react-redux
Redux 🚀, Redux 🤘, Redux 🔥 - and the magic optimization
https://github.com/theKashey/beautiful-react-redux
memoization optimization react redux reselect
Last synced: 3 months ago
JSON representation
Redux 🚀, Redux 🤘, Redux 🔥 - and the magic optimization
- Host: GitHub
- URL: https://github.com/theKashey/beautiful-react-redux
- Owner: theKashey
- License: mit
- Created: 2018-02-11T09:32:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-18T10:55:08.000Z (about 6 years ago)
- Last Synced: 2024-07-06T07:05:06.774Z (4 months ago)
- Topics: memoization, optimization, react, redux, reselect
- Language: JavaScript
- Homepage:
- Size: 236 KB
- Stars: 88
- Watchers: 6
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - beautiful-react-redux - and the magic optimization | theKashey | 88 | (JavaScript)
README
beautiful-react-redux
=====
Automagically enhances, even enchants redux `connect`, to be more concrete - `mapStateToProps`,
wrapping it with `memoize-state` to sky-rocket your application.Just import beautiful-react-redux and forget about __reselect__ and any other selector memoization.
Now your application will runs like it has MobX underneath.No updates when you dont expect them. For all. For free!
[![NPM](https://nodei.co/npm/beautiful-react-redux.png?downloads=true&stars=true)](https://nodei.co/npm/beautiful-react-redux/)
## Usage
#### Auto-magic
```js
// to get automatic deep-equal memoization for all mapStateToProps
import 'beautiful-react-redux/patch';
```#### Or just replace react-redux by beautiful-react-redux
```js
//import {connect, Provider} from 'react-redux';
import {connect, Provider} from 'beautiful-react-redux';
```100% compatible with any other memoization you might already had underneath.
#### Double check your existing selectors
If you already handling selectors by your own, and dont need external tools -
you can just double check that your mapStateToProps is good enough.
```js
// to get automatic checks for your mapStateToProps
import 'beautiful-react-redux/check';
```PS: Better not to mix memoize and check.
Consider double measure performance, or use only `beautiful-react-redux/check` and another memoization library.
# Licence
MIT