React & Modern Javascript
306 subscribers
43 photos
17 videos
15 files
245 links
React for Developers ๐Ÿš€๐Ÿš€
Useful Articles๐Ÿ“ƒ
DailyTipsโšก๏ธ
Introduction videos๐Ÿ’ซ
Courses๐Ÿ—ƒ
Covering the Updates of Modern Web Development!๐ŸŒŽ

Link : t.me/ReactDev
Contact Us if You Have Any Questions or Suggestions:
@MrGh0st
@stfuBlyat
Download Telegram
Lets say that you have an input element in a webpage, and this input is responsible for a search bar mechanism.
and whenever there's a KeyPress Event, you would want to trigger the API call to fetch your data results for the search term, and update the view, very typical.

but what if the user abuse this behavior? that can easily lead to a high pressure on your server and even on your client. plus, the user doesn't really need to see the updates with each keystroke from his keyboard instantly. So how to fix this?

One clean and easy solution would be a Debounce mechanism. It will attach a 200ms(or any amount of time) to the latest event from the user's input. then and only then the search term is formed and being sent to the server, reducing the server and client load.

Debounce is only one of the cool things you can find in ReactiveX. A library for composing asynchronous and event-based programs

https://reactivex.io/intro.html
https://rxjs.dev/api/operators/debounce

#frontend #backend
@ReactDev ๐Ÿš€
This media is not supported in your browser
VIEW IN TELEGRAM
Synchronizing React with browser API โš™๏ธ

#react #frontend
@ReactDev ๐Ÿš€
React SPA Lazy Loading Pitfalls โš›๏ธ

You should be lazy loading some of your routes. And if you are, you're probably messing up the data-fetching because it's an easy mistake to make.

๐Ÿ”— https://bit.ly/3TMjud0

#react #frontend
@ReactDev ๐Ÿš€