Isolate fetch using custome hook: To use this custom hook, you would simply import it into your component and call
Tag: React
React Related Commands
Create a react app npx create-react-app project_name Start development server cd project_name npm start See ESLin configurations npm ls eslint
Okta React App
https://github.com/okta/samples-js-react/tree/master/okta-hosted-login https://github.com/okta/okta-react/tree/master/samples Sign users in to your SPA using the redirect model OIDC – OpenID Connect. Proof Key for Code
Server side events
Event Source API An EventSource instance opens a persistent connection to an HTTP server, which sends events in text/event-stream format. The connection remains open until closed by calling EventSource.close().
REACT interview questions
What is “prop drilling” and how to prevent it pass the state as “props” through each nested component UseContext hook
React Hooks
Hooks can only be called inside React function components. Hooks can only be called at the top level of a
Okta SPA
Sign User into Okta using redirect model Github samples: https://github.com/okta/samples-js-react https://github.com/oktadev/okta-react-login-example https://github.com/okta/samples-js-react/tree/master/okta-hosted-login <–this one
React App to AWS Amplify
AWS tutorial Github domain hosting create github repo clone github repo create react app npx create-react-app . 4. add all
React Debugging
JSX expressions must have one parent element. Wrap all elements in render function under one <div></div> or <Fragment></Fragment> Warning: Each