Learn JavaScript
4.3K subscribers
459 photos
10 videos
132 files
3.02K links
All info, tutorial, JS tips and more ....!
bio.link/javascript_js_
For HTML: @html_web_learn
For CSS: @CSS_web_learn
For JS: @JavaScript_js_learn
For PHP: @learn_php_web
For Programming courses @Programmingworld_dev
For CEH,Cybersec: @technical_stark
Download Telegram
JavaScript Tip 💡

By using function composition, you can compose functions for different purposes.

In this case, we're using one function to create different "setter" functions for updating state in React.

#Javascripttip #Reacttip
React Tip 💡

If your component renders the same result given the same props, try wrapping it in React.memo to make them "pure".

This will prevent them from re-rendering, except when their props are changing.

It can potentially give you a great performance boost 🔥

#Javascripttip #ReactTip
JavaScript Tip 💡

Use the property
valueAsNumber to get the numeric number from an input field through an event.

Here's an example in React

#Javascripttip #Reacttip
JavaScript Tip 💡

Did you know that you can cancel a fetch request using an AbortController?

A common use-case is React:
If a component unmounts while a fetch call is awaited, it can be useful to abort the call.

#Javascripttip #Reacttip