@dan_abramov I mean, before was like this
useEffect(() => {
if (end) {
console.log('Sending analytics event');
}
}, [end]);
And following the article I thought It was the good approach but I would need to add Reac.memo to the component
@dan_abramov Let's see this example:
const Component = ({ start, end }) => {
if (end) {
console.log('Sending analytics event');
}
};
If I remove the effect this event will be sent every father render, should I use a React.memo just for this?
I am playing with Profiler after the workshop about #react#performance hosted by @kentcdodds.
Is it possible the following scenario: where the parent component is not rendering but their children do? also the reason of the render is: the parent component rendered 🤔
Here's one that I've been thinking about for a very long time: Application State Management with React
"How React is all you need to manage your application state"
https://t.co/ekkiySqKV1
Me: I’m a programmer.
Person 1: “make my website pls”
Person 2: “I have a billion dollar idea”
Person 3: “can you fix my printer?”
Person 4: “How do I create a table of contents in Microsoft Word?”
Fixed time, fixed scope projects always end in 1 of 3 ways:
1. We move the deadline.
2. We reduce scope.
3. We implement “crunch mode” , everybody puts in 80 hour weeks till the deadline, burns out, quits and goes to work somewhere else.
#JavaScript tip for today:
When you have an array of objects use `console.table` to log them as a (sortable!) table.
If there are too many properties (columns), you can also specify which one to display - it simply is the second parameter. Useful when showing DOM nodes.