React Hooks + Redux - User Registration and Login Tutorial & Example
For documentation and live demo see https://jasonwatmore.com/post/2020/03/02/react-hooks-redux-user-registration-and-login-tutorial-example
React Hooks + Redux - User Registration and Login Tutorial & Example
License: MIT License
React Hooks + Redux - User Registration and Login Tutorial & Example
For documentation and live demo see https://jasonwatmore.com/post/2020/03/02/react-hooks-redux-user-registration-and-login-tutorial-example
hello @cornflourblue for your efforts,
I was inspired by this example , but I noticed that something is missing.
the privateRoute is not really functional, you are using the localstorage to check if user was logged.
#the problem is if I put some dummy-data without fetching my api in localstorage, I will get access to private route(redux-system usage ?)
my question do you have a safe way to resrict access to privates routes and precheck if data is correct, if local storage was manually updated or inserted(corrupted data)
export const PrivateRoute = ({ component: Component, ...rest }) => (
<Route {...rest} render={props => (
localStorage.getItem('user')
? <Component {...props} />
: <Redirect to={{ pathname: '/login', state: { from: props.location } }} />
)} />
)
I downloaded this repo and intalled packages with 'npm install'
After npm start. Got below error
ERROR in ./src/index.jsx
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Cannot find module '@babel/compat-data/corejs3-shipped-proposals'
Error: Config file /config/runtime.json cannot be read. Error code is: undefined. Error message is: FileSystem.readFileSync is not a function.
Getting this error idk why
Thanks for a great app and tutorial!
I'm wondering how to change the styling (css).
Thanks!
Hi there, I'm curious: What's the best way in your opinion to modify your code in order to support GraphQL?
Redux + GraphQL might be an overkill.
So curious as to your preferred approach.
Thanks!
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.