From 6671ba7b77142a73184caf863890d5ff20f2361b Mon Sep 17 00:00:00 2001 From: Oliver Joseph Ash Date: Wed, 7 Aug 2024 10:46:23 +0100 Subject: [PATCH 1/5] Document behaviour of setting state inside `useLayoutEffect` (#7096) Co-authored-by: Sebastian Silbermann --- src/content/reference/react/useLayoutEffect.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/content/reference/react/useLayoutEffect.md b/src/content/reference/react/useLayoutEffect.md index 0d7b0484..d38458f1 100644 --- a/src/content/reference/react/useLayoutEffect.md +++ b/src/content/reference/react/useLayoutEffect.md @@ -67,6 +67,8 @@ function Tooltip() { * The code inside `useLayoutEffect` and all state updates scheduled from it **block the browser from repainting the screen.** When used excessively, this makes your app slow. When possible, prefer [`useEffect`.](/reference/react/useEffect) +* If you trigger a state update inside `useLayoutEffect`, React will execute all remaining Effects immediately including `useEffect`. + --- ## Usage {/*usage*/} From 2bfa7a628b0534bb0d437ff7520a72010ab970c3 Mon Sep 17 00:00:00 2001 From: lauren Date: Thu, 8 Aug 2024 10:43:41 -0400 Subject: [PATCH 2/5] Update compiler docs installation instructions (#7095) --- src/content/learn/react-compiler.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/content/learn/react-compiler.md b/src/content/learn/react-compiler.md index f34c382e..2920e864 100644 --- a/src/content/learn/react-compiler.md +++ b/src/content/learn/react-compiler.md @@ -121,7 +121,7 @@ In addition to these docs, we recommend checking the [React Compiler Working Gro Prior to installing the compiler, you can first check to see if your codebase is compatible: -npx react-compiler-healthcheck@latest +npx react-compiler-healthcheck@experimental This script will: @@ -143,7 +143,7 @@ Found no usage of incompatible libraries. React Compiler also powers an eslint plugin. The eslint plugin can be used **independently** of the compiler, meaning you can use the eslint plugin even if you don't use the compiler. -npm install eslint-plugin-react-compiler +npm install eslint-plugin-react-compiler@experimental Then, add it to your eslint config: @@ -203,7 +203,7 @@ If you're starting a new project, you can enable the compiler on your entire cod ### Babel {/*usage-with-babel*/} -npm install babel-plugin-react-compiler +npm install babel-plugin-react-compiler@experimental The compiler includes a Babel plugin which you can use in your build pipeline to run the compiler. @@ -258,7 +258,7 @@ Next.js has an experimental configuration to enable the React Compiler. It autom - Install `babel-plugin-react-compiler` -npm install next@canary babel-plugin-react-compiler +npm install next@canary babel-plugin-react-compiler@experimental Then configure the experimental option in `next.config.js`: From e7edbfcbdcc7d910809302d347e3fe9795f15e8d Mon Sep 17 00:00:00 2001 From: Khakim Aidarkhan Date: Tue, 20 Aug 2024 12:50:09 +0500 Subject: [PATCH 3/5] resolve conflict --- src/components/SocialBanner.tsx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/components/SocialBanner.tsx b/src/components/SocialBanner.tsx index f45ab8a8..2db62c99 100644 --- a/src/components/SocialBanner.tsx +++ b/src/components/SocialBanner.tsx @@ -7,15 +7,9 @@ import {useRef, useEffect} from 'react'; import cn from 'classnames'; import {ExternalLink} from './ExternalLink'; -<<<<<<< HEAD -const bannerText = 'Украинаны қолдаңыз 🇺🇦'; -const bannerLink = 'https://opensource.fb.com/support-ukraine'; -const bannerLinkText = 'Украинаға гуманитарлық көмек көрсетуге көмектесіңіз'; -======= const bannerText = 'Stream React Conf on May 15-16.'; const bannerLink = 'https://conf.react.dev/'; const bannerLinkText = 'Learn more.'; ->>>>>>> c3bc5affa0e7452e306c785af11798d16b4f6dd4 export default function SocialBanner() { const ref = useRef(null); From f1324cc1a0c22a7b0a48ea6cbe1a7995c62632b5 Mon Sep 17 00:00:00 2001 From: Khakim Aidarkhan Date: Tue, 20 Aug 2024 12:52:39 +0500 Subject: [PATCH 4/5] resolve conflict --- src/content/community/conferences.md | 7 +++---- src/content/learn/editor-setup.md | 4 ---- src/content/learn/installation.md | 4 ---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/content/community/conferences.md b/src/content/community/conferences.md index 36c1c966..b86c720c 100644 --- a/src/content/community/conferences.md +++ b/src/content/community/conferences.md @@ -10,19 +10,18 @@ Do you know of a local React.js conference? Add it here! (Please keep the list c ## Upcoming Conferences {/*upcoming-conferences*/} -<<<<<<< HEAD + ### React Paris 2024 {/*react-paris-2024*/} March 22, 2024. In-person in Paris, France + Remote (hybrid) [Website](https://react.paris/) - [Twitter](https://twitter.com/BeJS_) - [LinkedIn](https://www.linkedin.com/events/7150816372074192900/comments/) -<<<<<<< HEAD -======= + ### Epic Web Conf 2024 {/*epic-web-2024*/} April 10 - 11, 2024. In-person in Park City, UT, USA [Website](https://www.epicweb.dev/conf) - [YouTube](https://www.youtube.com/@EpicWebDev) ->>>>>>> c3bc5affa0e7452e306c785af11798d16b4f6dd4 + ### React Miami 2024 {/*react-miami-2024*/} April 19 - 20, 2024. In-person in Miami, FL, USA diff --git a/src/content/learn/editor-setup.md b/src/content/learn/editor-setup.md index 1df3bc0b..d36f75ea 100644 --- a/src/content/learn/editor-setup.md +++ b/src/content/learn/editor-setup.md @@ -40,11 +40,7 @@ React қауымдастығында қолданылатын басқа тан ### Форматтау {/*formatting*/} -<<<<<<< HEAD -Кодыңызды басқа адамдармен бөліскен кезде ең соңғы уайымдайтын нәрсе ол [табтар немесе бос орындар](https://www.google.com/search?q=tabs+vs+spaces)! Қуанышқа орай, [Prettier](https://prettier.io/) кодты алдын ала орнатылған ережелерге сәйкес форматтайды. Prettier-ді іске қосыңыз, сонда барлық қойған табтар, бос орындар, тырнақша түрі және т.б. конфигурацияға сәйкес келетіндей етіп өзгертіледі. Prettier файлды сақтаған кезде форматтауды іске қосылады, бұл сіздің жұмысынызды жеңілдетеді. -======= The last thing you want to do when sharing your code with another contributor is get into a discussion about [tabs vs spaces](https://www.google.com/search?q=tabs+vs+spaces)! Fortunately, [Prettier](https://prettier.io/) will clean up your code by reformatting it to conform to preset, configurable rules. Run Prettier, and all your tabs will be converted to spaces—and your indentation, quotes, etc will also all be changed to conform to the configuration. In the ideal setup, Prettier will run when you save your file, quickly making these edits for you. ->>>>>>> c3bc5affa0e7452e306c785af11798d16b4f6dd4 Мына қадамдарды орындау арқылы [VSCode ішінде Prettier кеңейтімін](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) орнатуға болады: diff --git a/src/content/learn/installation.md b/src/content/learn/installation.md index 10a2ed48..179e1dcd 100644 --- a/src/content/learn/installation.md +++ b/src/content/learn/installation.md @@ -37,11 +37,7 @@ export default function App() { Дәл осы жерде код жазуға немесе жоғарғы оң жақ бұрыштағы «Fork» түймесін басу арқылы кодты жаңа табта ашуға болады. -<<<<<<< HEAD -Мұндай құмжәшіктер React құжаттамасының беттерінің көпшілігінде қолжетімді. React құжаттамасынан басқа, React-ті қолдайтын көптеген онлайн құмжәшіктері бар: мысалы, [CodeSandbox](https://codesandbox.io/s/new), [StackBlitz](https://stackblitz.com/fork/react), немесе [CodePen.](https://codepen.io/pen?&editors=0010&layout=left&prefill_data_id=3f4569d1-1b11-4bce-bd46-89090eed5ddb) -======= Most pages in the React documentation contain sandboxes like this. Outside of the React documentation, there are many online sandboxes that support React: for example, [CodeSandbox](https://codesandbox.io/s/new), [StackBlitz](https://stackblitz.com/fork/react), or [CodePen.](https://codepen.io/pen?template=QWYVwWN) ->>>>>>> 2a2e02f1d88f4d2828728ce352626e84ed8abda0 ### Локальде React-тi қолданып көріңіз {/*try-react-locally*/} From abc025f8212f40eefa3323395e36e7af8ffb7052 Mon Sep 17 00:00:00 2001 From: Khakim Aidarkhan Date: Tue, 20 Aug 2024 13:07:12 +0500 Subject: [PATCH 5/5] update rss --- public/rss.xml | 4 ++-- src/content/community/conferences.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/rss.xml b/public/rss.xml index 869c2cfa..afa88a16 100644 --- a/public/rss.xml +++ b/public/rss.xml @@ -4,9 +4,9 @@ https://react.dev/ react.dev rss module - Mon, 19 Aug 2024 13:10:21 GMT + Tue, 20 Aug 2024 08:06:26 GMT - Mon, 19 Aug 2024 13:10:21 GMT + Tue, 20 Aug 2024 08:06:26 GMT <![CDATA[React Conf 2024 Recap]]> diff --git a/src/content/community/conferences.md b/src/content/community/conferences.md index f6fdd709..679fc706 100644 --- a/src/content/community/conferences.md +++ b/src/content/community/conferences.md @@ -881,4 +881,4 @@ July 2 & 3 in Paris, France ### React.js Conf 2015 {/*reactjs-conf-2015*/} January 28 & 29 in Facebook HQ, CA -[Website](http://conf2015.reactjs.org/) - [Schedule](http://conf2015.reactjs.org/schedule.html) - [Videos](https://www.youtube.com/playlist?list=PLb0IAmt7-GS1cbw4qonlQztYV1TAW0sCr) +[Website](http://conf2015.reactjs.org/) - [Schedule](http://conf2015.reactjs.org/schedule.html) - [Videos](https://www.youtube.com/playlist?list=PLb0IAmt7-GS1cbw4qonlQztYV1TAW0sCr) \ No newline at end of file