🔹 جذب نیروی متخصص در زمینه طراحی صفحات وب با استفاده از VueJS یا ReactJS به صورت پروژه ای.
🔖 متقاضیان محترم میتوانند برای کسب اطلاعات بیشتر و ارسال رزومه با آیدی زیر در ارتباط باشند👇
@RasaBotAdmin
#JOB
#React
🔖 متقاضیان محترم میتوانند برای کسب اطلاعات بیشتر و ارسال رزومه با آیدی زیر در ارتباط باشند👇
@RasaBotAdmin
#JOB
#React
#DailyTips 💡
Use Jest for Testing your React Components 🕵🏻️♀️
https://facebook.github.io/jest/docs/en/tutorial-react.html
#react #testing #jest
Join Us @ReactDev :: 🚀
Use Jest for Testing your React Components 🕵🏻️♀️
https://facebook.github.io/jest/docs/en/tutorial-react.html
#react #testing #jest
Join Us @ReactDev :: 🚀
#DailyTips 💡
Stop Styling React Components with Javascript 😟
https://medium.com/front-end-developers/stop-styling-react-components-with-javascript-8b4a7ec96eea
#react
Join Us :: ⚛️@ReactDev🚀
Stop Styling React Components with Javascript 😟
https://medium.com/front-end-developers/stop-styling-react-components-with-javascript-8b4a7ec96eea
#react
Join Us :: ⚛️@ReactDev🚀
Medium
Stop Styling React Components with Javascript
In frontend, every tool has its reasons for existence. You can’t make CSS less necessary by your ability to write it inside of the…
#DailyTips 💡
If you're a SSR fan, try out Next.js ⚡
Next.js is a JavaScript framework for building server-rendered web application built on top of React, Webpack, and Babel.
https://nextjs.org
#react #library #ssr
Join Us :: ⚛️@ReactDev🚀
If you're a SSR fan, try out Next.js ⚡
Next.js is a JavaScript framework for building server-rendered web application built on top of React, Webpack, and Babel.
https://nextjs.org
#react #library #ssr
Join Us :: ⚛️@ReactDev🚀
nextjs.org
Next.js by Vercel - The React Framework
Production grade React applications that scale. The world's leading companies use Next.js by Vercel to build static and dynamic websites and web applications.
React 360 replaces React VR for streamlined development focus
Facebook Code
https://code.facebook.com/posts/572676549773149/react-360-replaces-react-vr-for-streamlined-development-focus/
#update #article #react
Join Us :: ⚛️@ReactDev🚀
Facebook Code
https://code.facebook.com/posts/572676549773149/react-360-replaces-react-vr-for-streamlined-development-focus/
#update #article #react
Join Us :: ⚛️@ReactDev🚀
Facebook Code
React 360 replaces React VR for streamlined development focus
React VR is getting a series of improvements, including Pixel Perfect 2D, improved media support, and better playback performance. It's also being renamed React 360 to better reflect how most developers use the framework.
#update ✨
⚛ React v16.4.0: Pointer Events ⬆
The latest minor release adds support for an oft-requested feature: pointer events!
https://reactjs.org/blog/2018/05/23/react-v-16-4.html
#react #blog
Join Us :: ⚛️@ReactDev🚀
⚛ React v16.4.0: Pointer Events ⬆
The latest minor release adds support for an oft-requested feature: pointer events!
https://reactjs.org/blog/2018/05/23/react-v-16-4.html
#react #blog
Join Us :: ⚛️@ReactDev🚀
legacy.reactjs.org
React v16.4.0: Pointer Events – React Blog
This blog site has been archived. Go to react.dev/blog to see the recent posts. The latest minor release adds support for an oft-requested feature: pointer events! It also includes a bugfix for . Check out the full changelog below. Pointer Events The following…
Time for a Comparison 👊🏻
React Native vs Flutter - Which to Learn? 🤔
#comparison #react_native #mobile
Join Us :: ⚛️@ReactDev🚀
React Native vs Flutter - Which to Learn? 🤔
#comparison #react_native #mobile
Join Us :: ⚛️@ReactDev🚀
101 React Tips & Tricks For Beginners To Experts ✨
🔗 https://bit.ly/4cl3SE4
#react #frontend
@ReactDev 🚀
🔗 https://bit.ly/4cl3SE4
#react #frontend
@ReactDev 🚀
DEV Community
101 React Tips & Tricks For Beginners To Experts ✨
I have been working professionally with React for the past +5 years. In this article, I share the...
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 🚀
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 🚀
ReactTraining.com
SPA Lazy Loading Pitfalls
React Corporate Workshops, Training, and Consulting
Using callbacks to achieve better component decoupling in React ⚛️
🔗 https://bit.ly/3TL3EzF
#react #frontend
@ReactDev 🚀
🔗 https://bit.ly/3TL3EzF
#react #frontend
@ReactDev 🚀
darios.blog
Using callbacks to achieve better component decoupling in React
Decouple React components effectively by passing functions the right way, creating more testable and maintainable code.
There are hundreds of custom React hooks to access the local storage out there. But I was tempted to create my own using
This was my first attempt.
Everything seemed to work at first. When I called
After few hours of debugging, I finally reached out to my sometimes-genius-sometimes-idiot companion, the gpt-4o which I am using via Supermaven. It immediately pointed out the problem with the code. At first, I didn't believe its explanation so I asked for the proof by giving me the documentation link. By the way, you should not blindly trust what LLM says. Always verify! Anyway, it gave me the link and once again I learned something new thanks to AI.
So the problem is that the "storage" events are only fired when local storage is changed by a different document, not the document where the change originated. It's properly documented in the MDN docs but I didn't know it. So when I save the value in the local storage from the
Equipped with this knowledge, I was able to fix the code by adding a custom event listener:
This custom hook basically does two things:
1. listens to the storage event and the custom event local-storage-change.
2. sends a custom event local-storage-change after storing the value in the local storage.
I still add the official storage event listener because I want the component to still re-redner when the local storage is changed by another document.
Source: https://bit.ly/4eF3QbX
#react #hooks
@ReactDev 🚀
useSyncExternalStore
since I figured it's the proper hooks for this kind of use case. Now I'm sure there are already a package that does exactly what I want, but I wanted to create it by myself, for the sake of learning.This was my first attempt.
const useLocalStorage = (
key: string,
initialValue: string
) => {
const data = useSyncExternalStore(
(onChange) => {
window.addEventListener("storage", onChange);
return () => {
window.removeEventListener("storage", onChange);
};
},
() => {
const data = localStorage.getItem(key);
return data || initialValue;
},
() => initialValue
);
const setData = useCallback(
(value: string) => {
localStorage.setItem(key, value);
},
[key]
);
return [data, setData] as const;
};
Everything seemed to work at first. When I called
setData
function, the value was persisted in the local storage. But then I noticed that the data value was not updated which didn't re-render the component that used the hook in result. The weird thing was that when I directly modified the value in the local storage, the data value was updated and the component re-rendered. That caused me to think that the change subscription of useSyncExternalStore
wasn indeed working.After few hours of debugging, I finally reached out to my sometimes-genius-sometimes-idiot companion, the gpt-4o which I am using via Supermaven. It immediately pointed out the problem with the code. At first, I didn't believe its explanation so I asked for the proof by giving me the documentation link. By the way, you should not blindly trust what LLM says. Always verify! Anyway, it gave me the link and once again I learned something new thanks to AI.
So the problem is that the "storage" events are only fired when local storage is changed by a different document, not the document where the change originated. It's properly documented in the MDN docs but I didn't know it. So when I save the value in the local storage from the
setData
function, the event is not fired hence the useSyncExternalStore
doesn't return the updated value.Equipped with this knowledge, I was able to fix the code by adding a custom event listener:
const useLocalStorage = (key: string, initialValue?: string | null) => {
const data = useSyncExternalStore(
(onChange) => {
const onStorageEvent = (e: Event) => {
const customEvent = e as CustomEvent;
if (customEvent.detail.key === key) {
onChange();
}
};
window.addEventListener("storage", onChange);
window.addEventListener(
"local-storage-change",
onStorageEvent as EventListener
);
return () => {
window.removeEventListener("storage", onChange);
window.removeEventListener(
"local-storage-change",
onStorageEvent as EventListener
);
};
},
() => {
const data = localStorage.getItem(key);
return data || initialValue;
},
() => initialValue
);
const setData = useCallback(
(value: string) => {
localStorage.setItem(key, value);
window.dispatchEvent(
new CustomEvent("local-storage-change", { detail: { key } })
);
},
[key]
);
return [data, setData] as const;
};
This custom hook basically does two things:
1. listens to the storage event and the custom event local-storage-change.
2. sends a custom event local-storage-change after storing the value in the local storage.
I still add the official storage event listener because I want the component to still re-redner when the local storage is changed by another document.
Source: https://bit.ly/4eF3QbX
#react #hooks
@ReactDev 🚀
Nico's Blog
SSR-friendly Custom React Hook for Local Storage Read and Write
I learned something new about window's storage event!
What are React Server Components? 🤔⚛️
Web Dev Simplified
https://youtu.be/rGPpQdbDbwo?feature=shared
#react #frontend
@ReactDev 🚀
Web Dev Simplified
https://youtu.be/rGPpQdbDbwo?feature=shared
#react #frontend
@ReactDev 🚀
YouTube
React Server Components Change Everything
Full Next.js Course: https://reactsimplified.com/?utm_source=youtube&utm_medium=video-description&utm_term=video-id-rGPpQdbDbwo#next-js-course
Server vs Client Components Article: https://blog.webdevsimplified.com/2023-11/react-server-components/?utm_sou…
Server vs Client Components Article: https://blog.webdevsimplified.com/2023-11/react-server-components/?utm_sou…