r/reactjs • u/Alngaawy • Oct 09 '21
r/reactjs • u/Eliav2 • May 03 '21
Show /r/reactjs How React hooks work - in depth
How React hooks work - in depth
Intro
In simple cases, React Hooks will magically do exactly what you meant for, but in other cases, their behavior can feel inconsistent and unpredictable. the next article will try to deeply explain and demonstrate React hooks behavior.
The article consisted of four main sections:
Definitions - this section summarizes important terms in React and web development which necessary for the rest of the article.
React Hooks - explains what type of hooks exists, what the difference between them, and how they behave.
Examples - examples that demonstrate everything explained in this article with an increasing difficulty rate.
Recap - summary with the most important notes.
Which of you that will finish reading the article to the end, and will really understand the latest example, will no longer be surprised by unexpected problems when using hooks in components with a complicated lifecycle.
The article is not for starters, and I will assume that you have some experience with React and React hooks.
code sandbox of all examples: https://codesandbox.io/s/github/Eliav2/how-react-hooks-work
webpage of sandbox(examples on full screen): https://d47vv.csb.app/
GitHub repo: https://github.com/Eliav2/how-react-hooks-work
article mirrors
read in your preferred platform:
For best readability and for most updated version please read from Home page. Comments and questions can be left on your preferred platform.
Definitions
If you are not a React expert, It is strongly recommended to read the definitions section. You can start from the example section and then return to this section later if something is not clear.
the more important definitions here are: render, update, React hook and phase.
browser DOM - a tree of HTML elements. These elements make up everything the user sees in the browser, including this very page.
React - A library for manipulating React components.
React component - function(or class) that holds stateful logic managed by React lib, that component usually returns UI elements based on the stateful logic of the same component.
React have class components, and functional components(FC).React tree - a tree of React components(like the tree you can see in React devtools). this is not the same as the browser's DOM tree.
React renderer - ReactDOM in web(or React-native in mobile) - a library that knows how to manipulate React tree and 'render' it into the browser's DOM in the desired location(in React apps usually to
rootelement). The renderer managing a Virtual DOM (VDOM) which is created and updated based on the given React tree.render - this is the moment when React tree is created based on the current state.
then the tree is passed to the renderer that will update the VDOM, and then will flush the changes into the browser's DOM.update - when we say that a component 'updates', we are saying that the function component body re-executed (with possibly different props). it is possible that more the one update cycle will occur before a render. examples of the difference between
updateandrenderlater.React hook - A primitive that shares stateful logic with the parent Component. this is the reason hooks allowed only inside a body of a function component - hook is
hookedto the parent component stateful logic. The hook and the parent component updates are triggers in the same phase, and the effects of the hook and the FC also fire in the same phase.a component's phase - this is not an official term, I'm using this term in this tutorial to describe a different point of time in a React component. update: also React calls this phase.
Note - These definitions were summarized by me and may not be accurate, but they are sufficient to understand the rest of the article.
React Hooks
There 2 types of React hooks:
State hooks - like
useStateoruseReducer. these hooks use and possibly manipulates the parent component stateful logic.Effect hooks - one of
useEffectoruseLayoutEffect. these hooks receive a callback function and usually a dependency array. the callback function will be scheduled by React to fire on a later phase(see definition above). the exact phase is dependent on the effect that was chosen.
Effects from the same type will be executed in the order of declaration.
Super Important Notes
Calling state hook from effect(like useEffect) will schedule another render.
Calling state hook from FC body will schedule another update call.
Render cycle
these are the phases of a render:
update call - the moment FC body is executed. this is always the first phase of a render.
effects
useLayoutEffect - it is triggered immediately after all the scheduled update calls executed, just before flushing changes to the browser's DOM and before useEffect.
the docs say:Updates scheduled inside useLayoutEffect will be flushed synchronously before the browser has a chance to paint.
useEffect - it is triggered after all scheduled updates calls has been executed. this is always the last phase of a render.
after these phases, the 'render' step is completed and then ReactDOM will do the 'commit' step which basically just saying updating the browser's DOM based on the virtual DOM created by the render step. the 'commit' phase is not relevant for the purpose of this article.
cleanup effects
before each effect is fired a cleanup function is fired(if scheduled). the cleanup effects are:
useLayoutEffect cleanup
useEffect cleanup
Note - cleanup effect will never fire on the first render(because there is no prior effect to cleanup from).
Render cycle summary:
per render cycle: Each effect fires the most 1 times, excluding update call which fires at least once.
The effects are fired in this order(excluding the first render), and only if was scheduled:
updateCall - may be called several times for a single render, and will occur one after another before any effect!
useLayoutEffect cleanup
useLayoutEffect
useEffect cleanup
useEffect
the AllPhases example demonstrates this very well.
Examples
important Note - each line of the code that will come next are part of the tutorial, even the comments. read them all to follow along. these examples are self-explanatory.
Make sure looking at each example code sandbox(there is a link at the end of each example)!
Basic
<details open>
OK enough words. see the next example.
const Basic = () => {
// log function helper
// this will help up follow the component phase cycle
const render = useRef(0);
const call = useRef(0);
const consoleState = () => `{call:${call.current},render:${render.current}}`;
const log = (...args) => console.log(...args, consoleState());
// update phase counts
call.current += 1;
useEffect(() => {
render.current += 1;
});
//logic
useEffect(() => {
log('mount has finished');
}, []);
useEffect(() => {
log('render has finished');
});
log('update call');
return <div/>;
};
what order of logs would you expect when the component mounts? think for a second and replace the '?':
/**
* expected logs:
* update call {call:?,render:?}
* mount has finished {call:?,render:?}
* render has finished {call:?,render:?}
*/<details>
<summary>Reveal answer</summary>
well, the order is:
/**
* expected logs:
* update call {call:1,render:0}
* mount has finished {call:1,render:1}
* render has finished {call:1,render:1}
*/as we explained earlier, the function body fire first and then the effects.
</details>
</details>
BasicReverse
<details>
what will happen if we will replace the effects, does the order will change?
const BasicReverse = () => {
// log function helper
// ...
// logic
useEffect(() => {
log("render has finished");
});
useEffect(() => {
log("mount has finished");
}, []);
log("update call");
return <div/>;
};well, the order does change, and will be:
/**
* expected logs:
* update call {call:1,render:0}
* render has finished {call:1,render:1}
* mount has finished {call:1,render:1}
*/this is because effect hooks from the same type(here useEffect) are scheduled by React for the same phase and will be executed in the order of declaration, this is a common mistake to think that useEffect with an empty dependency array will fire on the mount and on a different phase from useEffect with no dependency array.
</details>
useLog
<details>
now let's create a log helper hook useLog that will let us keep track of the component phase for later examples:
const useLog = (componentName = '', effect = useEffect) => {
// keep track of phase
const render = useRef(0);
const call = useRef(0);
const consoleState = () =>
`{call:${call.current},render:${render.current}}(${componentName})`;
const log = (...args) => console.log(...args, consoleState());
effect(() => {
render.current += 1;
callToEffectTime.current = Math.round((performance.now() - startTime) * 100) / 100;
});
call.current += 1;
return log;
};render.current and call.current will 'tick' at the same rate of the parent component because of hooks natures.
This is simplified useLog, you will see different useLog hook in the UseLog.js file which includes some logic for time execution logic.
and usage:
const Basic = () => {
const log = useLog();
useEffect(() => {
log('finished render');
});
return <div/>;
};
/**
* expected logs:
* finished render {call:1,render:1}()
*/</details>
unmount
<details>
if we will trigger unmount after mount the logs order will be:
const BasicUnmount = () => {
const log = useLog();
useEffect(() => {
log('mount');
return () => log('unmount');
}, []);
useEffect(() => {
log('render');
return () => log('un-render');
});
log('update call');
return <div>asd</div>;
/**
* expected logs:
* update call {call:1,render:0}
* mount {call:1,render:1}
* render {call:1,render:1}
* unmount {call:1,render:1}
* un-render {call:1,render:1}
*/
};when a component goes through unmounting step - the update phase does not happen, only the effect fire, in the order of declaration.
</details>
Effect vs LayoutEffect
<details>
useLayoutEffect is executed before useEffect:
const EffectVsLayoutEffect = () => {
const logUseLayoutEffect = useLog("useLayoutEffect", useLayoutEffect);
const logUseEffect = useLog("useEffect", useEffect);
useEffect(() => {
logUseEffect("boom!");
});
useLayoutEffect(() => {
logUseLayoutEffect("boom!");
});
return <div />;
/**
* expected logs:
* boom! {call:1,render:1}(useLayoutEffect) in 4.21ms
* boom! {call:1,render:1}(useEffect) in 13.37ms
*/
};
</details>
AllPhases
<details>
This demonstrates all the different phases combined. after mount another dumy re-render is scheduled, we will use absolute timing for this example to see when each phase is executed:
const AllPhases = () => {
const logUseLayoutEffect = useLog("useLayoutEffect", useLayoutEffect, "abs");
const logUseEffect = useLog("useEffect", useEffect, "abs");
const [, setState] = useState({});
const forceRender = () => setState({});
useEffect(() => {
logUseEffect("useEffect");
return () => logUseEffect("useEffect cleanup");
});
useLayoutEffect(() => {
logUseLayoutEffect("useLayoutEffect");
return () => logUseLayoutEffect("useLayoutEffect cleanup");
});
logUseEffect("update");
// fire only on mount
useEffect(() => {
logUseEffect(
"component fully mounted and render cycle ended. now scheduling another render..."
);
forceRender();
return () => logUseEffect("unmount cleanup");
}, []);
return <div/>;
/**
* expected logs:
* update {call:1,render:0}(useEffect) 513.565ms
* useLayoutEffect {call:1,render:1}(useLayoutEffect) 517.345ms
* useEffect {call:1,render:1}(useEffect) 527.335ms
* component fully mounted and render cycle ended. now scheduling another render... {call:1,render:1}(useEffect) 527.6ms
* update {call:2,render:1}(useEffect) 529.675ms
* useLayoutEffect cleanup {call:2,render:1}(useLayoutEffect) 530.935ms
* useLayoutEffect {call:2,render:2}(useLayoutEffect) 531.32ms
* useEffect cleanup {call:2,render:1}(useEffect) 531.75ms
* useEffect {call:2,render:2}(useEffect) 532.01ms
*/
};
this example deeply demonstrates all the different possible phases while a component renders. make sure you understand that before proceeding to the next examples.
</details>
UpdateCycle
<details>
when you set a state while in the update phase another update phase will be scheduled by React. let's try to force React to trigger 10 update calls before rendering.
const UpdateCycle = () => {
const log = useLog("UpdateCycle");
const [, setState] = useState({});
const forceUpdate = () => setState({});
const updateCalls = useRef(0);
const HandleClick = () => {
updateCalls.current = 0;
forceUpdate();
};
updateCalls.current += 1;
if (updateCalls.current < 10) forceUpdate();
useEffect(() => {
log("render");
});
log("update");
return (
<div style={boxStyle} onClick={HandleClick}>
click
</div>
);
/**
* update {call:1,render:0}(UpdateCycle) 0.33ms
* update {call:2,render:0}(UpdateCycle) 0.17ms
* update {call:3,render:0}(UpdateCycle) 0.03ms
* update {call:4,render:0}(UpdateCycle) 0.025ms
* update {call:5,render:0}(UpdateCycle) 0.045ms
* update {call:6,render:0}(UpdateCycle) 0.04ms
* update {call:7,render:0}(UpdateCycle) 0.03ms
* update {call:8,render:0}(UpdateCycle) 0.02ms
* update {call:9,render:0}(UpdateCycle) 0.03ms
* update {call:10,render:0}(UpdateCycle) 0.015ms
* render {call:10,render:1}(UpdateCycle) 0.245ms
*/
};as we can see, we forced React to re-call the function body 10 times before performing the render. we can also notice that the render phase occurred 0.245ms after the last update call.
</details>
RenderCycle
<details>
Ok, so we saw what happens when we update the state while in the update phase, but what happens if we try to update the state when we are no longer in the update phase? well, React will schedule an entire re-render cycle for the component. each render cycle will also include at least one update call.
let's force 5 render cycles:
const RenderCycle = () => {
const log = useLog("RenderCycle");
const [, setState] = useState({});
const forceRender = () => setState({});
const renderCalls = useRef(0);
const HandleClick = () => {
renderCalls.current = 0;
forceRender();
};
useEffect(() => {
renderCalls.current += 1;
if (renderCalls.current < 5) forceRender();
log("render");
});
log("update");
return (
<div style={boxStyle} onClick={HandleClick}>
click
</div>
);
/**
* update {call:1,render:0}(RenderCycle) 0.365ms
* render {call:1,render:1}(RenderCycle) 0.33ms
* update {call:2,render:1}(RenderCycle) 0.26ms
* render {call:2,render:2}(RenderCycle) 0.315ms
* update {call:3,render:2}(RenderCycle) 0.12ms
* render {call:3,render:3}(RenderCycle) 0.25ms
* update {call:4,render:3}(RenderCycle) 0.07ms
* render {call:4,render:4}(RenderCycle) 0.495ms
* update {call:5,render:4}(RenderCycle) 0.055ms
* render {call:5,render:5}(RenderCycle) 0.135ms
*/
};
we can see that each render cycle comes with an update call.
</details>
CombinedCycle
<details>
now lets say we want 5 update calls for each render. let's force 3 renders:
const CombinedCycle = () => {
const log = useLog("CombinedCycle");
const [, setState] = useState({});
const forceUpdate = () => setState({});
const updateCalls = useRef(0);
const renderCalls = useRef(0);
const HandleClick = () => {
updateCalls.current = 0;
renderCalls.current = 0;
forceUpdate();
};
updateCalls.current += 1;
if (updateCalls.current < 5) forceUpdate();
useEffect(() => {
renderCalls.current += 1;
if (renderCalls.current < 3) forceUpdate();
updateCalls.current = 0;
log("render");
});
log("update");
return (
<div style={boxStyle} onClick={HandleClick}>
click
</div>
);
};
/**
* update {call:1,render:0}(CombinedCycle) 0.085ms
* update {call:2,render:0}(CombinedCycle) 0.17ms
* update {call:3,render:0}(CombinedCycle) 0.03ms
* update {call:4,render:0}(CombinedCycle) 0.025ms
* update {call:5,render:0}(CombinedCycle) 0.03ms
* render {call:5,render:1}(CombinedCycle) 0.29ms
* update {call:6,render:1}(CombinedCycle) 0.03ms
* update {call:7,render:1}(CombinedCycle) 0.095ms
* update {call:8,render:1}(CombinedCycle) 0.02ms
* update {call:9,render:1}(CombinedCycle) 0.04ms
* update {call:10,render:1}(CombinedCycle) 0.025ms
* render {call:10,render:2}(CombinedCycle) 0.08ms
* update {call:11,render:2}(CombinedCycle) 0.055ms
* update {call:12,render:2}(CombinedCycle) 0.085ms
* update {call:13,render:2}(CombinedCycle) 0.025ms
* update {call:14,render:2}(CombinedCycle) 0.03ms
* update {call:15,render:2}(CombinedCycle) 0.03ms
* render {call:15,render:3}(CombinedCycle) 0.085ms
*/</details>
MultipleComponents
<details>
Let's combine the last 3 examples into the common parent.
import UpdateCycle from "./UpdateCycle";
import RenderCycle from "./RenderCycle";
import CombinedCycle from "./CombinedCycle";
const Example = () => (
<>
<UpdateCycle/>
<RenderCycle/>
<CombinedCycle/>
</>
);
now stop. think. what would you expect? does each component will go through her own update-render phases or maybe the update calls will occur one after another and then the effects one after another?
<details>
<summary>Reveal answer</summary>
the entire tree goes through the phase of the update, and only then the effects are fired.
/**
* update {call:1,render:0}(UpdateCycle) 0.505ms
* update {call:2,render:0}(UpdateCycle) 0.22ms
* update {call:3,render:0}(UpdateCycle) 0.03ms
* update {call:4,render:0}(UpdateCycle) 0.035ms
* update {call:5,render:0}(UpdateCycle) 0.075ms
* update {call:6,render:0}(UpdateCycle) 0.05ms
* update {call:7,render:0}(UpdateCycle) 0.04ms
* update {call:8,render:0}(UpdateCycle) 0.04ms
* update {call:9,render:0}(UpdateCycle) 0.045ms
* update {call:10,render:0}(UpdateCycle) 0.025ms
* update {call:1,render:0}(RenderCycle) 0.035ms
* update {call:1,render:0}(CombinedCycle) 0.065ms
* update {call:2,render:0}(CombinedCycle) 0.06ms
* update {call:3,render:0}(CombinedCycle) 0.065ms
* update {call:4,render:0}(CombinedCycle) 0.045ms
* update {call:5,render:0}(CombinedCycle) 0.04ms
* render {call:10,render:1}(UpdateCycle) 0.15ms
* render {call:1,render:1}(RenderCycle) 0.33ms
* render {call:5,render:1}(CombinedCycle) 0.17ms
* update {call:2,render:1}(RenderCycle) 0.295ms
* update {call:6,render:1}(CombinedCycle) 0.045ms
* update {call:7,render:1}(CombinedCycle) 0.045ms
* update {call:8,render:1}(CombinedCycle) 0.04ms
* update {call:9,render:1}(CombinedCycle) 0.06ms
* update {call:10,render:1}(CombinedCycle) 0.04ms
* render {call:2,render:2}(RenderCycle) 0.145ms
* render {call:10,render:2}(CombinedCycle) 0.145ms
* update {call:3,render:2}(RenderCycle) 0.055ms
* update {call:11,render:2}(CombinedCycle) 0.05ms
* update {call:12,render:2}(CombinedCycle) 0.085ms
* update {call:13,render:2}(CombinedCycle) 0.03ms
* update {call:14,render:2}(CombinedCycle) 0.015ms
* update {call:15,render:2}(CombinedCycle) 0.02ms
* render {call:3,render:3}(RenderCycle) 0.125ms
* render {call:15,render:3}(CombinedCycle) 0.075ms
* update {call:4,render:3}(RenderCycle) 0.06ms
* render {call:4,render:4}(RenderCycle) 0.135ms
* update {call:5,render:4}(RenderCycle) 0.025ms
* render {call:5,render:5}(RenderCycle) 0.06ms
*/</details>
</details>
phew! that was tough. if you read and understand everything to this point you can confidently say that you understand React hook's nature.
Component with complicated lifecycle
so why do we need to understand all of this? well, in simple cases you don't, but when dealing with a component with a complicated lifecycle you can sometimes get confused by the component's behavior. an example of such component will be react-xarrow which needs to trigger callback on different phases to get the right dimensions and activate animations callbacks on different phases, for that react-xarrows using react-use-call-onnext-render to schedule callback for later phases.
Recap
on each phase: An entire React Tree goes through each phase in a render cycle one after another, which means that if one component in the tree is in the useEffect phase for example, all the different components in the tree are currently also in the useEffect phase.
for a React Tree: on the same phase, each Component on React tree will fire each phase in the same order of the declaration of the react component in the React tree. for example:
<> <Comp1/> <Comp2/> </>the useEffect if
Comp1will fire and only then the useEffectComp2will fire.On the same React component: on the same phase, each effect from the same type will fire in the order of declaration.
That's it! you now understand what really going on when you asks React to update some state in some component.
If you liked this tutorial make sure to like it and share it! thank you for reading until the end!
r/reactjs • u/simplyadesigner • Jul 19 '20
Resource My web app with 100+ beautiful, copy-paste-ready code sections is (ALMOST) here π₯³
My friend and I have ALMOST finished a super fun side project called Pastepanda (https://try.pastepanda.com/early-access-beta): a library of copy-paste-ready and neatly coded sections for different kinds of web projects!! Boy, have we fought to get it out in the open! π
After many iterations, going from an extremely wide scope to a more modest first version, we finally thought: letβs just release the landing page and hope for the best.
Iβm so pumped to hear what you all in the React community think!! π
r/reactjs • u/marko_knoebl • Jun 25 '20
Resource I teach React courses - here's my collection of over 600 slides on various React topics (hosted on GitHub, licensed under CC-BY-SA)
marko-knoebl.github.ior/reactjs • u/joyancefa • Sep 30 '20
Resource Here is how to access Kent Dodds' $359 Epic React course repositories
For those looking, these are the repositories that are used for the EpicReact course (all the content is OPEN SOURCE π)
- https://github.com/kentcdodds/react-fundamentals
- https://github.com/kentcdodds/react-hooks
- https://github.com/kentcdodds/advanced-react-hooks
- https://github.com/kentcdodds/advanced-react-patterns
- https://github.com/kentcdodds/react-performance
- https://github.com/kentcdodds/testing-react-apps
- https://github.com/kentcdodds/react-suspense
- https://github.com/kentcdodds/bookshelf
You can also watch the course tour here : https://www.youtube.com/watch?v=SDWxeGKX7Fs&t=75s
r/reactjs • u/abdulmdiaz • May 21 '20
Show /r/reactjs Built a Dribbble Clone for Developers, MVP
r/reactjs • u/Wojtek1942 • May 06 '19
Microsoft launches React Native for Windows
r/reactjs • u/paulnovacovici • Jan 17 '21
Show /r/reactjs Website Built With React Hooks to Learn Music Lyrics and Practice Typing
r/reactjs • u/skt84 • Apr 23 '23
Resource I am a Senior React Developer offering free 1-on-1 mentoring to Beginner and Intermediate Developers
Hello. I am making myself available - at no cost, apart from a little of your time - to coach beginner and intermediate React developers. Please feel free to DM me if you are looking for someone to help guide you, want to "up your game"/"take it to the next level", or you are simply struggling with a project and need some assistance.
What's the catch? No catch, this is a completely free. I just like teaching people and seeing them succeed. There's no structured curriculum or exams, and the sessions will generally be driven by what you need.
Why should I trust you? My career in web development spans over a decade and I have experience ranging from agencies to startups to enterprises. Each of us are beginners at the start and I've made every mistake before, so I want to help others break through the same challenges we all face sooner or later. The last few years I've been working as a technical lead coaching junior and not-yet-senior developers and that has been really rewarding for me.
Here is a brief list of common tech and patterns I have worked with:
React (well, yeah, that's why I'm here)
NextJS (SSR, SSG, ISR)
React Router (SPA, CSR)
React Hook Form and Formik
TypeScript
State Management with Redux + Toolkit + Query / Zustand and Jotai / React Query
Context
Suspense and Error Boundaries
Hooks (built-in and custom)
Composition
Inversion of Control
TailwindCSS, Vanilla Extract, CSS Modules, Styled Components
There are a few qualifiers that will help make the time more enjoyable...
You should already be a little familiar with React itself. There are plenty of tutorials on learning and getting started with React that I'm positioning these sessions as more of a "Okay I know JSX, what next?" type of conversation rather than starting from the very beginning
You should have a specific problem you are trying to solve, such as an existing project you are working on or you have encountered certain patterns you would like to deep dive into
your project shouldn't be work-related for security and intellectual property reasons - unless you have explicit permission/authority to share - but you may ask questions about a pattern you came across at work
This is not pre-recorded tutorial videos or bootcamp/workshop-based. It is personal 1-on-1 voice+video chat over Discord (a new private server that you will be invited to). If these kinds of sessions continue there will be more people invited to the server over time
you have a microphone and solid internet connection to avoid clunky communication
You have VS Code with the Live Share extension so that we can share a code session
I currently plan to be available for about 4hrs/week which can be made up of 1hr/day (evenings or weekends) or 2hrs/day (weekends only). You don't need to use 4hrs yourself, this is just a rough idea of how much time I can dedicate to it each week and could be split between multiple people depending on demand and capacity
I am based in Australian Eastern Standard Time (GMT +10) so we may need to coordinate to find appropriate times to meet
You should have reasonable English skills and be cool with my Aussie accent - I'm sorry, it is the only language I speak and I'd like to minimise language barriers getting in the way for the sake of efficiency
I can't promise you'll "get" something from these sessions since each one will be tailored to where you're at and where you want to be, but I do hope there is something of value that you find helpful
r/reactjs • u/marko_knoebl • Mar 04 '22
Resource I teach React courses - here's my updated collection of over 800 slides on various React topics (hosted on GitHub, licensed under CC-BY-SA)
marko-knoebl.github.ior/reactjs • u/fwouts • Apr 01 '22
Show /r/reactjs Preview.js - Open source IDE extension I made to preview React (and Vue) components
r/reactjs • u/acemarke • Nov 02 '20
News New "Redux Fundamentals" core docs tutorial is live! Learn "how Redux works and how to use it", from the ground up
r/reactjs • u/AmruthPillai • Apr 22 '20
Show /r/reactjs I rebuilt my personal portfolio using GatsbyJS, and I'm loving it!
EDIT: Wow, my first Reddit Gold Award. Thank you so much! I'm so glad you guys find this so inspiring and helpful. I'm just blessed β₯οΈ
It's been about 4 years since I started my project, Resume on the Web, where I created a website that portrays who I am and my ever-changing personality. Every once in a while, I revamp the whole thing using new technologies so that I keep myself updated with the latest and greatest, and also gives me a creative outlet to experiment with new design ideas.
This year, I kicked it up a notch by revamping the design of the old boring two-column resume look, to something a lot more vibrant, responsive and effective. I'll keep my words to a minimum and let the website do the talking :)
Introducing, the brand-new, Resume on the Web:
https://amruthpillai.com/
For those who want the technical deets, this version is built with GatsbyJS, a static-site React framework that I wanted to explore recently, as well as Tailwind CSS for the uber-cool utility classes.
As always, the source code for the project is available on GitHub here: https://github.com/AmruthPillai/ResumeOnTheWeb-Gatsby
Please do let me know if you liked it as much as I enjoyed making it! :)
r/reactjs • u/marko_knoebl • Dec 03 '20
Resource I teach React courses - here's my updated collection of over 700 slides on various React topics (hosted on GitHub, licensed under CC-BY-SA)
marko-knoebl.github.ior/reactjs • u/stevezease • May 04 '20
Resource I made a quick React and Redux interview cheat sheet for 2020
Link is here
I've been brushing up on my basic for interviewing in react/redux and found many interview question sources to be a bit out of date and obscure. So as part of my preparation process, I went through many interview question sources as well as the ReactJS/Redux official documentation to put together a cheat sheet for the questions and topics I saw repeatedly. Answers to questions are in bullet form with further in-depth readings cited as part of each question. I hope this helps those that are preparing or need a refresher!
Please note that questions are meant to cover basics and fundamentals. I did my best to be as unopinionated as possible citing exact areas of the documentation where I paraphrased from. I've linked in the bottom my primary sources for interview questions, many of them being the cream of the crop of interview questions that I've come across. If you see anywhere that I made a mistake or could use improvement, please let me know! Thank you.
r/reactjs • u/Soileau • Jan 08 '21
Show /r/reactjs Did you know you could use emojis as favicons? I made a tiny tool to stub out the HTML for you!
r/reactjs • u/Xiy • Feb 28 '21
Resource Instagram Clone - React Tutorial - Tailwind CSS - Firebase - React Testing Library - Cypress