This hook will let you know from the console the attributes of an object that have been updated, causing rerendering.
You should use it to avoid unnecessary renders.
#techtweets #day200
This hook will let you know from the console the attributes of an object that have been updated, causing rerendering.
You should use it to avoid unnecessary renders.
#techtweets #day200
For the same result, the code generated by Babel with be smaller with functions.
#techtweets #day199
For the same result, the code generated by Babel with be smaller with functions.
#techtweets #day199
It is useful to reuse and factorize some pieces of definitions.
#techtweets #day198
It is useful to reuse and factorize some pieces of definitions.
#techtweets #day198
You need to prefix an attribute or a method with # to make it private.
#techtweets #day197
You need to prefix an attribute or a method with # to make it private.
#techtweets #day197
#techtweets #day195
#techtweets #day195
It can be helpful to wrap an element with a descriptive tooltip.
#techtweets #day194
It can be helpful to wrap an element with a descriptive tooltip.
#techtweets #day194
#techtweets #day193
#techtweets #day193
Any property or sub-property will then become readonly.
#techtweets #day192
Any property or sub-property will then become readonly.
#techtweets #day192
#techtweets #day191
#techtweets #day191
It might help you avoid layout shifts
#techtweets #day189
It might help you avoid layout shifts
#techtweets #day189
The hook that solves that uses refs and effects to manage the interval correctly.
#techtweets #day188
The hook that solves that uses refs and effects to manage the interval correctly.
#techtweets #day188
It will act like an object, but it will also merge multiple definitions if included in the same namespace
#techtweets #day186
It will act like an object, but it will also merge multiple definitions if included in the same namespace
#techtweets #day186
This can also be triggered for `
This can also be triggered for `
It is very helpful on responsive designs or to priorise the right information for screen readers -a title is more important than an image.
Use it with care however.
#techtweets #day183
It is very helpful on responsive designs or to priorise the right information for screen readers -a title is more important than an image.
Use it with care however.
#techtweets #day183
`const forward = useKeyPress("w");`
You might want to use it for a `wasd` navigation for example.
#techtweets #day182
`const forward = useKeyPress("w");`
You might want to use it for a `wasd` navigation for example.
#techtweets #day182
It can be used to measure a method's performance or inject additional parameters among many other use cases.
#techtweets #day180
It can be used to measure a method's performance or inject additional parameters among many other use cases.
#techtweets #day180
It can be instanced from most supported numeric format such as hexadecimal, octal, binary an of course decimal.
Just add a `n` at the end of your number!
#techtweets @day179
It can be instanced from most supported numeric format such as hexadecimal, octal, binary an of course decimal.
Just add a `n` at the end of your number!
#techtweets @day179
With this property, you can apply a SVG polygon, circle, ellipse, path, ... to modify the shape of your element.
For example, it is easy to create askew blocs with polygon!
#techtweets #day177
With this property, you can apply a SVG polygon, circle, ellipse, path, ... to modify the shape of your element.
For example, it is easy to create askew blocs with polygon!
#techtweets #day177
BTW, looks at the `event.code` instruction which is meant to replace the `event.keyCode` which is now deprecated.
#techtweets #day176
BTW, looks at the `event.code` instruction which is meant to replace the `event.keyCode` which is now deprecated.
#techtweets #day176
The more complex your CSS rules are the longer your page will take to be repainted
The BEM model is one way to make your styles more robust and performant#techtweets #day175
web.dev/reduce-the-sco… en.bem.info
The more complex your CSS rules are the longer your page will take to be repainted
The BEM model is one way to make your styles more robust and performant#techtweets #day175
web.dev/reduce-the-sco… en.bem.info
When working with union types, it will help you apply a specific behavior to a specific type
#techtweets #day174
When working with union types, it will help you apply a specific behavior to a specific type
#techtweets #day174
#techtweets #day173
#techtweets #day173
The mask works with opacity: a plain image for a no opacity mask, hidden for an opacity mask. semi-opacity also works.
Check an amazing example made by @5t3ph here:#techtweets #day171
codepen.io/5t3ph/pen/GRQe…
The mask works with opacity: a plain image for a no opacity mask, hidden for an opacity mask. semi-opacity also works.
Check an amazing example made by @5t3ph here:#techtweets #day171
codepen.io/5t3ph/pen/GRQe…
One of the useful hooks I often use is `useDebouncedValue`.
Check the ALT on the image to copy the code.
#techtweets #day170
One of the useful hooks I often use is `useDebouncedValue`.
Check the ALT on the image to copy the code.
#techtweets #day170
It will force you to specify the right type for the key and for the value.
#techtweets #day168
It will force you to specify the right type for the key and for the value.
#techtweets #day168