lukashala / react-simply Goto Github PK
View Code? Open in Web Editor NEWTools for simple React development
License: MIT License
Tools for simple React development
License: MIT License
Is it possible to add to the docs to explain how this approach works with React Router (v5)?
getState()
is meant to be used as React hook, so we may use more compatible name useState()
. This would for example enable proper detection as hook by eslint-plugin-react-hooks
.
Can/does this work with react debug tools for time-travel debug etc to entirely replace Redux?
If not is there a best-practice approach to giving some Redux level of debugging
thanks
Wondering what you think about doing this for your reducer instead of the switch statement? My thoughts were switch statements could get long, plus maintaining a large one could be annoying. Plus the type key/value pair seems redundant if you make the added state object agnostic of static state names.
const reducer = (state, action) => {
const actionKey = Object.getOwnPropertyNames(action)
return action ? { ...state, [actionKey] : action[actionKey] } : state
}
instead of dispatching like so,
() => dispatch({ type: 'type', thing: false})
you would dispatch like so,
() => dispatch({thing: false})
Hi... First of all, thx for sharing this solution. I've found a way to support middleware/enhancers for This solution, there's still some testing and validation. Do You think It could be a nice addition?
Are there any plans to add Typescript typings?
I'm receiving this error regarding line 35 of your script.
Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.