From 4fae9e8905873922e9374465de5aee19f2455f39 Mon Sep 17 00:00:00 2001 From: numb86 <16703337+numb86@users.noreply.github.com> Date: Tue, 4 Feb 2020 07:53:12 +0900 Subject: [PATCH 1/7] Fix internal link (#2668) --- content/docs/concurrent-mode-adoption.md | 2 +- content/docs/how-to-contribute.md | 4 ++-- content/docs/reference-profiler.md | 4 ++-- content/docs/refs-and-the-dom.md | 2 +- content/docs/testing-environments.md | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/content/docs/concurrent-mode-adoption.md b/content/docs/concurrent-mode-adoption.md index 45d3b0ea3..8d7ed8cbc 100644 --- a/content/docs/concurrent-mode-adoption.md +++ b/content/docs/concurrent-mode-adoption.md @@ -80,7 +80,7 @@ ReactDOM.createRoot( > >Concurrent Mode APIs such as `createRoot` only exist in the experimental builds of React. -In Concurrent Mode, the lifecycle methods [previously marked](https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html) as "unsafe" actually *are* unsafe, and lead to bugs even more than in today's React. We don't recommend trying Concurrent Mode until your app is [Strict Mode](https://reactjs.org/docs/strict-mode.html)-compatible. +In Concurrent Mode, the lifecycle methods [previously marked](/blog/2018/03/27/update-on-async-rendering.html) as "unsafe" actually *are* unsafe, and lead to bugs even more than in today's React. We don't recommend trying Concurrent Mode until your app is [Strict Mode](/docs/strict-mode.html)-compatible. ## What to Expect {#what-to-expect} diff --git a/content/docs/how-to-contribute.md b/content/docs/how-to-contribute.md index ca872712d..2eb71ec21 100644 --- a/content/docs/how-to-contribute.md +++ b/content/docs/how-to-contribute.md @@ -21,7 +21,7 @@ All work on React happens directly on [GitHub](https://github.com/facebook/react ### Semantic Versioning {#semantic-versioning} -React follows [semantic versioning](https://semver.org/). We release patch versions for critical bugfixes, minor versions for new features or non-essential changes, and major versions for any breaking changes. When we make breaking changes, we also introduce deprecation warnings in a minor version so that our users learn about the upcoming changes and migrate their code in advance. Learn more about our commitment to stability and incremental migration in [our versioning policy](https://reactjs.org/docs/faq-versioning.html). +React follows [semantic versioning](https://semver.org/). We release patch versions for critical bugfixes, minor versions for new features or non-essential changes, and major versions for any breaking changes. When we make breaking changes, we also introduce deprecation warnings in a minor version so that our users learn about the upcoming changes and migrate their code in advance. Learn more about our commitment to stability and incremental migration in [our versioning policy](/docs/faq-versioning.html). Every significant change is documented in the [changelog file](https://github.com/facebook/react/blob/master/CHANGELOG.md). @@ -56,7 +56,7 @@ Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe ### How to Get in Touch {#how-to-get-in-touch} * IRC: [#reactjs on freenode](https://webchat.freenode.net/?channels=reactjs) -* [Discussion forums](https://reactjs.org/community/support.html#popular-discussion-forums) +* [Discussion forums](/community/support.html#popular-discussion-forums) There is also [an active community of React users on the Discord chat platform](https://www.reactiflux.com/) in case you need help with React. diff --git a/content/docs/reference-profiler.md b/content/docs/reference-profiler.md index 7c03dc63b..bd80403c8 100644 --- a/content/docs/reference-profiler.md +++ b/content/docs/reference-profiler.md @@ -7,11 +7,11 @@ permalink: docs/profiler.html --- The `Profiler` measures how often a React application renders and what the "cost" of rendering is. -Its purpose is to help identify parts of an application that are slow and may benefit from [optimizations such as memoization](https://reactjs.org/docs/hooks-faq.html#how-to-memoize-calculations). +Its purpose is to help identify parts of an application that are slow and may benefit from [optimizations such as memoization](/docs/hooks-faq.html#how-to-memoize-calculations). > Note: > -> Profiling adds some additional overhead, so **it is disabled in [the production build](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build)**. +> Profiling adds some additional overhead, so **it is disabled in [the production build](/docs/optimizing-performance.html#use-the-production-build)**. > > To opt into production profiling, React provides a special production build with profiling enabled. > Read more about how to use this build at [fb.me/react-profiling](https://fb.me/react-profiling) diff --git a/content/docs/refs-and-the-dom.md b/content/docs/refs-and-the-dom.md index 8ba52d2fa..e18ab9683 100644 --- a/content/docs/refs-and-the-dom.md +++ b/content/docs/refs-and-the-dom.md @@ -161,7 +161,7 @@ class Parent extends React.Component { } ``` -If you want to allow people to take a `ref` to your function component, you can use [`forwardRef`](https://reactjs.org/docs/forwarding-refs.html) (possibly in conjunction with [`useImperativeHandle`](/docs/hooks-reference.html#useimperativehandle)), or you can convert the component to a class. +If you want to allow people to take a `ref` to your function component, you can use [`forwardRef`](/docs/forwarding-refs.html) (possibly in conjunction with [`useImperativeHandle`](/docs/hooks-reference.html#useimperativehandle)), or you can convert the component to a class. You can, however, **use the `ref` attribute inside a function component** as long as you refer to a DOM element or a class component: diff --git a/content/docs/testing-environments.md b/content/docs/testing-environments.md index d77e76f44..c03714d01 100644 --- a/content/docs/testing-environments.md +++ b/content/docs/testing-environments.md @@ -29,7 +29,7 @@ A large portion of UI tests can be written with the above setup: using Jest as a If you're writing a library that tests mostly browser-specific behavior, and requires native browser behavior like layout or real inputs, you could use a framework like [mocha.](https://mochajs.org/) -In an environment where you _can't_ simulate a DOM (e.g. testing React Native components on Node.js), you could use [event simulation helpers](https://reactjs.org/docs/test-utils.html#simulate) to simulate interactions with elements. Alternately, you could use the `fireEvent` helper from [`@testing-library/react-native`](https://testing-library.com/docs/native-testing-library). +In an environment where you _can't_ simulate a DOM (e.g. testing React Native components on Node.js), you could use [event simulation helpers](/docs/test-utils.html#simulate) to simulate interactions with elements. Alternately, you could use the `fireEvent` helper from [`@testing-library/react-native`](https://testing-library.com/docs/native-testing-library). Frameworks like [Cypress](https://www.cypress.io/), [puppeteer](https://github.com/GoogleChrome/puppeteer) and [webdriver](https://www.seleniumhq.org/projects/webdriver/) are useful for running [end-to-end tests](#end-to-end-tests-aka-e2e-tests). From 10b052d11c3062d4af861c685d11c00590b0d194 Mon Sep 17 00:00:00 2001 From: Ailuue Date: Wed, 5 Feb 2020 10:04:29 +0800 Subject: [PATCH 2/7] Add "Chain React 2020" (#2714) Adds details for the July "Chain React 2020" conference in Portland, OR. --- content/community/conferences.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/content/community/conferences.md b/content/community/conferences.md index 74fff851b..6cbc3169e 100644 --- a/content/community/conferences.md +++ b/content/community/conferences.md @@ -82,6 +82,11 @@ July 18, 2020. Medellín, Colombia. [Website](https://reactlaconf.co/) - [Twitter](https://twitter.com/reactlaconf) +### Chain React 2020 {#chain-react-2020} +July 29-30, 2020. Portland, Oregon, USA. + +[Website](https://infinite.red/ChainReactConf) - [Twitter](https://twitter.com/ChainReactConf) + ### ComponentsConf 2020 {#components20} September 1, 2020 in Melbourne, Australia From f1a13ae1c113e4b20299c1a7fd0769d15195fb11 Mon Sep 17 00:00:00 2001 From: Philip Middleton Date: Thu, 6 Feb 2020 14:58:13 -0500 Subject: [PATCH 3/7] Added the Ann Arbor Michigan Meetup to the US list. (#1723) --- content/community/meetups.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/community/meetups.md b/content/community/meetups.md index 1d2e48afe..320506649 100644 --- a/content/community/meetups.md +++ b/content/community/meetups.md @@ -148,6 +148,7 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet * [Kyiv](https://www.meetup.com/Kyiv-ReactJS-Meetup) ## US {#us} +* [Ann Arbor, MI - ReactJS](https://www.meetup.com/AnnArbor-jsx/) * [Atlanta, GA - ReactJS](https://www.meetup.com/React-ATL/) * [Austin, TX - ReactJS](https://www.meetup.com/ReactJS-Austin-Meetup/) * [Boston, MA - ReactJS](https://www.meetup.com/ReactJS-Boston/) From c9fe940cb0a7eb6acffa546641a43178ed849e89 Mon Sep 17 00:00:00 2001 From: Sophie Alpert Date: Sat, 8 Feb 2020 15:09:29 -0800 Subject: [PATCH 4/7] Update faq-versioning.md It's 2020 already. --- content/docs/faq-versioning.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/faq-versioning.md b/content/docs/faq-versioning.md index df45e05a3..c32677eb7 100644 --- a/content/docs/faq-versioning.md +++ b/content/docs/faq-versioning.md @@ -22,7 +22,7 @@ Minor releases are the most common type of release. ### Breaking Changes {#breaking-changes} -Breaking changes are inconvenient for everyone, so we try to minimize the number of major releases – for example, React 15 was released in April 2016 and React 16 was released in September 2017; React 17 isn't expected until 2019. +Breaking changes are inconvenient for everyone, so we try to minimize the number of major releases – for example, React 15 was released in April 2016 and React 16 was released in September 2017; React 17 isn't expected until sometime in 2020. Instead, we release new features in minor versions. That means that minor releases are often more interesting and compelling than majors, despite their unassuming name. From e5edde701a268564c21c56b2324a6bed1b0de2ff Mon Sep 17 00:00:00 2001 From: Sam Cook <58375830+sjc5@users.noreply.github.com> Date: Sun, 9 Feb 2020 17:38:57 -0600 Subject: [PATCH 5/7] Corrected minor grammar issue (#2726) On line 40, the phrase following the 'comma and' should be independent (i.e., contain a subject). Alternatively, the comma preceding the 'and' should be deleted, making the dependent clause following the 'and' grammatically acceptable. --- content/tutorial/tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/tutorial/tutorial.md b/content/tutorial/tutorial.md index 579c7477a..12e943c5c 100644 --- a/content/tutorial/tutorial.md +++ b/content/tutorial/tutorial.md @@ -37,7 +37,7 @@ In this tutorial, we'll show how to build an interactive tic-tac-toe game with R You can see what we'll be building here: **[Final Result](https://codepen.io/gaearon/pen/gWWZgR?editors=0010)**. If the code doesn't make sense to you, or if you are unfamiliar with the code's syntax, don't worry! The goal of this tutorial is to help you understand React and its syntax. -We recommend that you check out the tic-tac-toe game before continuing with the tutorial. One of the features that you'll notice is that there is a numbered list to the right of the game's board. This list gives you a history of all of the moves that have occurred in the game, and is updated as the game progresses. +We recommend that you check out the tic-tac-toe game before continuing with the tutorial. One of the features that you'll notice is that there is a numbered list to the right of the game's board. This list gives you a history of all of the moves that have occurred in the game, and it is updated as the game progresses. You can close the tic-tac-toe game once you're familiar with it. We'll be starting from a simpler template in this tutorial. Our next step is to set you up so that you can start building the game. From 4367566bddd06ed9dfbd6b1c3f45f9925e60b2c3 Mon Sep 17 00:00:00 2001 From: Jakub Drozdek <30927218+jakubdrozdek@users.noreply.github.com> Date: Mon, 10 Feb 2020 00:41:06 +0100 Subject: [PATCH 6/7] Remove part about stateless components (#2694) --- content/docs/react-without-jsx.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/react-without-jsx.md b/content/docs/react-without-jsx.md index 85cdba45f..95a5ca967 100644 --- a/content/docs/react-without-jsx.md +++ b/content/docs/react-without-jsx.md @@ -40,7 +40,7 @@ ReactDOM.render( If you're curious to see more examples of how JSX is converted to JavaScript, you can try out [the online Babel compiler](babel://jsx-simple-example). -The component can either be provided as a string, or as a subclass of `React.Component`, or a plain function for stateless components. +The component can either be provided as a string, as a subclass of `React.Component`, or a plain function. If you get tired of typing `React.createElement` so much, one common pattern is to assign a shorthand: From 08c2c6c49b39d7b47336ad1247d36d99f97571c2 Mon Sep 17 00:00:00 2001 From: Christophe Porteneuve Date: Wed, 12 Feb 2020 16:50:05 +0100 Subject: [PATCH 7/7] Address all merge conflicts --- content/community/conferences.md | 2 +- content/community/meetups.md | 48 +----------------------- content/docs/concurrent-mode-adoption.md | 6 +-- content/docs/faq-versioning.md | 6 +-- content/docs/how-to-contribute.md | 11 +----- content/docs/react-without-jsx.md | 6 +-- content/docs/reference-profiler.md | 13 +------ content/docs/refs-and-the-dom.md | 6 +-- content/docs/testing-environments.md | 6 +-- content/tutorial/tutorial.md | 4 -- 10 files changed, 10 insertions(+), 98 deletions(-) diff --git a/content/community/conferences.md b/content/community/conferences.md index 5ae580124..93e3601b0 100644 --- a/content/community/conferences.md +++ b/content/community/conferences.md @@ -89,7 +89,7 @@ Le 18 juillet 2020 à Medellín, Colombie. [Site web](https://reactlaconf.co/) - [Twitter](https://twitter.com/reactlaconf) ### Chain React 2020 {#chain-react-2020} -July 29-30, 2020. Portland, Oregon, USA. +Du 29 au 30 juillet 2020 à Portland, Oregon, États-Unis. [Website](https://infinite.red/ChainReactConf) - [Twitter](https://twitter.com/ChainReactConf) diff --git a/content/community/meetups.md b/content/community/meetups.md index 8d2da7fef..5bb30fbfe 100644 --- a/content/community/meetups.md +++ b/content/community/meetups.md @@ -76,6 +76,7 @@ Vous organisez un meetup React.js dans votre ville ? Ajoutez-le ici !
* [Canarias](https://www.meetup.com/React-Canarias/) ## États-Unis d'Amérique {#us} +* [Ann Arbor, MI - ReactJS](https://www.meetup.com/AnnArbor-jsx/) * [Atlanta, GA - ReactJS](https://www.meetup.com/React-ATL/) * [Austin, TX - ReactJS](https://www.meetup.com/ReactJS-Austin-Meetup/) * [Boston, MA - ReactJS](https://www.meetup.com/ReactJS-Boston/) @@ -191,50 +192,3 @@ Vous organisez un meetup React.js dans votre ville ? Ajoutez-le ici !
## Ukraine {#ukraine} * [Kyiv](https://www.meetup.com/Kyiv-ReactJS-Meetup) -<<<<<<< HEAD -======= - -## US {#us} -* [Ann Arbor, MI - ReactJS](https://www.meetup.com/AnnArbor-jsx/) -* [Atlanta, GA - ReactJS](https://www.meetup.com/React-ATL/) -* [Austin, TX - ReactJS](https://www.meetup.com/ReactJS-Austin-Meetup/) -* [Boston, MA - ReactJS](https://www.meetup.com/ReactJS-Boston/) -* [Boston, MA - React Native](https://www.meetup.com/Boston-React-Native-Meetup/) -* [Charlotte, NC - ReactJS](https://www.meetup.com/ReactJS-Charlotte/) -* [Charlotte, NC - React Native](https://www.meetup.com/cltreactnative/) -* [Chicago, IL - ReactJS](https://www.meetup.com/React-Chicago/) -* [Cleveland, OH - ReactJS](https://www.meetup.com/Cleveland-React/) -* [Columbus, OH - ReactJS](https://www.meetup.com/ReactJS-Columbus-meetup/) -* [Dallas, TX - ReactJS](https://www.meetup.com/ReactDallas/) -* [Detroit, MI - Detroit React User Group](https://www.meetup.com/Detroit-React-User-Group/) -* [Irvine, CA - ReactJS](https://www.meetup.com/ReactJS-OC/) -* [Kansas City, MO - ReactJS](https://www.meetup.com/Kansas-City-React-Meetup/) -* [Las Vegas, NV - ReactJS](https://www.meetup.com/ReactVegas/) -* [Leesburg, VA - ReactJS](https://www.meetup.com/React-NOVA/) -* [Los Angeles, CA - ReactJS](https://www.meetup.com/socal-react/) -* [Los Angeles, CA - React Native](https://www.meetup.com/React-Native-Los-Angeles/) -* [Miami, FL - ReactJS](https://www.meetup.com/React-Miami/) -* [Nashville, TN - ReactJS](https://www.meetup.com/NashReact-Meetup/) -* [New York, NY - ReactJS](https://www.meetup.com/NYC-Javascript-React-Group/) -* [New York, NY - React Ladies](https://www.meetup.com/React-Ladies/) -* [New York, NY - React Native](https://www.meetup.com/React-Native-NYC/) -* [New York, NY - useReactNYC](https://www.meetup.com/useReactNYC/) -* [Palo Alto, CA - React Native](https://www.meetup.com/React-Native-Silicon-Valley/) -* [Philadelphia, PA - ReactJS](https://www.meetup.com/Reactadelphia/) -* [Phoenix, AZ - ReactJS](https://www.meetup.com/ReactJS-Phoenix/) -* [Pittsburgh, PA - ReactJS/React Native](https://www.meetup.com/ReactPgh/) -* [Portland, OR - ReactJS](https://www.meetup.com/Portland-ReactJS/) -* [Provo, UT - ReactJS](https://www.meetup.com/ReactJS-Utah/) -* [Sacramento, CA - ReactJS](https://www.meetup.com/Sacramento-ReactJS-Meetup/) -* [San Diego, CA - San Diego JS](https://www.meetup.com/sandiegojs/) -* [San Francisco - Real World React](https://www.meetup.com/Real-World-React) -* [San Francisco - ReactJS](https://www.meetup.com/ReactJS-San-Francisco/) -* [San Francisco, CA - React Native](https://www.meetup.com/React-Native-San-Francisco/) -* [San Ramon, CA - TriValley Coders](https://www.meetup.com/trivalleycoders/) -* [Santa Monica, CA - ReactJS](https://www.meetup.com/Los-Angeles-ReactJS-User-Group/) -* [Seattle, WA - React Native](https://www.meetup.com/Seattle-React-Native-Meetup/) -* [Seattle, WA - ReactJS](https://www.meetup.com/seattle-react-js/) -* [Tampa, FL - ReactJS](https://www.meetup.com/ReactJS-Tampa-Bay/) -* [Tucson, AZ - ReactJS](https://www.meetup.com/Tucson-ReactJS-Meetup/) -* [Washington, DC - ReactJS](https://www.meetup.com/React-DC/) ->>>>>>> 4367566bddd06ed9dfbd6b1c3f45f9925e60b2c3 diff --git a/content/docs/concurrent-mode-adoption.md b/content/docs/concurrent-mode-adoption.md index 171d772c0..dc52af3f7 100644 --- a/content/docs/concurrent-mode-adoption.md +++ b/content/docs/concurrent-mode-adoption.md @@ -79,11 +79,7 @@ ReactDOM.createRoot( > > Les API du mode concurrent, telles que `createRoot`, n’existent que dans les builds expérimentaux de React. -<<<<<<< HEAD -En mode concurrent, les méthodes de cycle de vie qui étaient [auparavant désignées](https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html) comme « dangereuses » *(“unsafe”, NdT)* sont *effectivement* dangereuses, et peuvent entraîner des bugs encore plus souvent que dans le code React habituel. Nous vous déconseillons de tester le mode concurrent tant que votre appli n’est pas compatible avec le [mode strict](https://reactjs.org/docs/strict-mode.html). -======= -In Concurrent Mode, the lifecycle methods [previously marked](/blog/2018/03/27/update-on-async-rendering.html) as "unsafe" actually *are* unsafe, and lead to bugs even more than in today's React. We don't recommend trying Concurrent Mode until your app is [Strict Mode](/docs/strict-mode.html)-compatible. ->>>>>>> 4367566bddd06ed9dfbd6b1c3f45f9925e60b2c3 +En mode concurrent, les méthodes de cycle de vie qui étaient [auparavant désignées](/blog/2018/03/27/update-on-async-rendering.html) comme « dangereuses » *(“unsafe”, NdT)* sont *effectivement* dangereuses, et peuvent entraîner des bugs encore plus souvent que dans le code React habituel. Nous vous déconseillons de tester le mode concurrent tant que votre appli n’est pas compatible avec le [mode strict](/docs/strict-mode.html). ## À quoi s’attendre ? {#what-to-expect} diff --git a/content/docs/faq-versioning.md b/content/docs/faq-versioning.md index 72e59e88b..7cd4b4fb5 100644 --- a/content/docs/faq-versioning.md +++ b/content/docs/faq-versioning.md @@ -22,11 +22,7 @@ Les versions mineures sont de loin les plus courantes. > Cette politique de versions ne s’applique pas aux pré-versions dans les canaux *Next* et *Experimental*. [En savoir plus sur les pré-versions](/docs/release-channels.html). -<<<<<<< HEAD -Personne n’aime perdre en compatibilité ascendante, nous essayons donc de minimiser le nombre de versions majeures ; par exemple, React 15 est sorti en avril 2016 et React 16 en septembre 2017 ; React 17 n'est pas prévu avant 2019. -======= -Breaking changes are inconvenient for everyone, so we try to minimize the number of major releases – for example, React 15 was released in April 2016 and React 16 was released in September 2017; React 17 isn't expected until sometime in 2020. ->>>>>>> 4367566bddd06ed9dfbd6b1c3f45f9925e60b2c3 +Personne n’aime perdre en compatibilité ascendante, nous essayons donc de minimiser le nombre de versions majeures ; par exemple, React 15 est sorti en avril 2016 et React 16 en septembre 2017 ; React 17 n'est pas prévu avant 2020. Au lieu de ça, nous publions les nouvelles fonctionnalités dans des versions mineures. Celles-ci sont souvent plus intéressantes et motivantes que les majeures, malgré leur nom modeste. diff --git a/content/docs/how-to-contribute.md b/content/docs/how-to-contribute.md index fa106f3ad..78326ded8 100644 --- a/content/docs/how-to-contribute.md +++ b/content/docs/how-to-contribute.md @@ -19,15 +19,11 @@ Facebook a adopté le code de conduite [Contributor Covenant](https://www.contri ### Développement ouvert {#open-development} -<<<<<<< HEAD Tout travail sur React se passe directement sur [GitHub](https://github.com/facebook/react). Les membres de l'équipe noyau *(core team, NdT)* tout comme les contributeurs externes y envoient leur _pull requests_, lesquelles passent à travers le même processus de revue. -======= -React follows [semantic versioning](https://semver.org/). We release patch versions for critical bugfixes, minor versions for new features or non-essential changes, and major versions for any breaking changes. When we make breaking changes, we also introduce deprecation warnings in a minor version so that our users learn about the upcoming changes and migrate their code in advance. Learn more about our commitment to stability and incremental migration in [our versioning policy](/docs/faq-versioning.html). ->>>>>>> 4367566bddd06ed9dfbd6b1c3f45f9925e60b2c3 ### Gestion sémantique des versions {#semantic-versioning} -React utilise une [gestion sémantique de version](https://semver.org/). Nous publions des versions de correctifs pour les corrections de bugs critiques, des versions mineures pour les nouvelles fonctionnalités et les modifications non-essentielles, et des versions majeures s'il y a rupture de la compatibilité ascendante. Quand nous introduisons de telles ruptures, nous ajoutons aussi des avertissements de dépréciation dans une version mineure afin que nos utilisateur·rice·s puissent se familiariser avec les changements à venir et migrer leur code en amont. Vous pouvez en apprendre davantage sur notre engagement en termes de stabilité et de migration incrémentielle dans notre [politique de gestion des versions](https://reactjs.org/docs/faq-versioning.html). +React utilise une [gestion sémantique de version](https://semver.org/). Nous publions des versions de correctifs pour les corrections de bugs critiques, des versions mineures pour les nouvelles fonctionnalités et les modifications non-essentielles, et des versions majeures s'il y a rupture de la compatibilité ascendante. Quand nous introduisons de telles ruptures, nous ajoutons aussi des avertissements de dépréciation dans une version mineure afin que nos utilisateur·rice·s puissent se familiariser avec les changements à venir et migrer leur code en amont. Vous pouvez en apprendre davantage sur notre engagement en termes de stabilité et de migration incrémentielle dans notre [politique de gestion des versions](/docs/faq-versioning.html). Toute modification substancielle est documentée dans le [journal des modifications](https://github.com/facebook/react/blob/master/CHANGELOG.md). @@ -61,13 +57,8 @@ Facebook a un [programme de récompenses](https://www.facebook.com/whitehat/) po ### Comment nous contacter {#how-to-get-in-touch} -<<<<<<< HEAD * IRC : [#reactjs sur freenode](https://webchat.freenode.net/?channels=reactjs) * [Forums de discussion](/community/support.html#popular-discussion-forums) -======= -* IRC: [#reactjs on freenode](https://webchat.freenode.net/?channels=reactjs) -* [Discussion forums](/community/support.html#popular-discussion-forums) ->>>>>>> 4367566bddd06ed9dfbd6b1c3f45f9925e60b2c3 Au cas où vous auriez besoin d'aide avec React, il existe aussi [une communauté active d'utilisateurs de React sur la plate-forme de discussion Discord](https://www.reactiflux.com/). diff --git a/content/docs/react-without-jsx.md b/content/docs/react-without-jsx.md index a147ef800..b98d7a0d2 100644 --- a/content/docs/react-without-jsx.md +++ b/content/docs/react-without-jsx.md @@ -40,11 +40,7 @@ ReactDOM.render( Si vous voulez voir plus d'exemples de conversion de code JSX en JavaScript brut, vous pouvez essayer [le compilateur Babel en ligne](babel://jsx-simple-example). -<<<<<<< HEAD -Le composant peut être soit une chaîne de caractères, soit une sous-classe de `React.Component`, soit une fonction simple pour les composants sans état. -======= -The component can either be provided as a string, as a subclass of `React.Component`, or a plain function. ->>>>>>> 4367566bddd06ed9dfbd6b1c3f45f9925e60b2c3 +Le composant peut être soit une chaîne de caractères, soit une sous-classe de `React.Component`, soit une fonction simple. Si vous n'avez pas envie de taper `React.createElement` à chaque fois, vous pouvez à la place créer un raccourci : diff --git a/content/docs/reference-profiler.md b/content/docs/reference-profiler.md index 06e3ae618..2d6740429 100644 --- a/content/docs/reference-profiler.md +++ b/content/docs/reference-profiler.md @@ -6,20 +6,11 @@ category: Reference permalink: docs/profiler.html --- -<<<<<<< HEAD -Le `Profiler` mesure à quelle fréquence une application React réalise son rendu, et détermine le « coût » de ces rendus. L’objectif est de vous aider à identifier les parties d’une application qui sont lentes et pourraient bénéficier [d’optimisations telles que la mémoïsation](https://reactjs.org/docs/hooks-faq.html#how-to-memoize-calculations). -======= -The `Profiler` measures how often a React application renders and what the "cost" of rendering is. -Its purpose is to help identify parts of an application that are slow and may benefit from [optimizations such as memoization](/docs/hooks-faq.html#how-to-memoize-calculations). ->>>>>>> 4367566bddd06ed9dfbd6b1c3f45f9925e60b2c3 +Le `Profiler` mesure à quelle fréquence une application React réalise son rendu, et détermine le « coût » de ces rendus. L’objectif est de vous aider à identifier les parties d’une application qui sont lentes et pourraient bénéficier [d’optimisations telles que la mémoïsation](/docs/hooks-faq.html#how-to-memoize-calculations). > Remarque > -<<<<<<< HEAD -> Le profilage pénalise légèrement les performances effectives, il est donc **désactivé dans [le build de production](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build)**. -======= -> Profiling adds some additional overhead, so **it is disabled in [the production build](/docs/optimizing-performance.html#use-the-production-build)**. ->>>>>>> 4367566bddd06ed9dfbd6b1c3f45f9925e60b2c3 +> Le profilage pénalise légèrement les performances effectives, il est donc **désactivé dans [le build de production](/docs/optimizing-performance.html#use-the-production-build)**. > > Pour activer le profilage en production, React fournit un build de production spécifique avec le profilage > activé. Vous pouvez apprendre comment l’utiliser sur [fb.me/react-profiling](https://fb.me/react-profiling). diff --git a/content/docs/refs-and-the-dom.md b/content/docs/refs-and-the-dom.md index daceb9ac5..3fbefe9f2 100644 --- a/content/docs/refs-and-the-dom.md +++ b/content/docs/refs-and-the-dom.md @@ -161,11 +161,7 @@ class Parent extends React.Component { } ``` -<<<<<<< HEAD -Si vous voulez permettre à vos utilisateurs de passer une `ref` à votre fonction composant, vous pouvez utiliser[`forwardRef`](https://reactjs.org/docs/forwarding-refs.html) (peut-être combiné à un [`useImperativeHandle`](/docs/hooks-reference.html#useimperativehandle)), ou vous pouvez convertir votre composant pour être à base de classe. -======= -If you want to allow people to take a `ref` to your function component, you can use [`forwardRef`](/docs/forwarding-refs.html) (possibly in conjunction with [`useImperativeHandle`](/docs/hooks-reference.html#useimperativehandle)), or you can convert the component to a class. ->>>>>>> 4367566bddd06ed9dfbd6b1c3f45f9925e60b2c3 +Si vous voulez permettre à vos utilisateurs de passer une `ref` à votre fonction composant, vous pouvez utiliser[`forwardRef`](/docs/forwarding-refs.html) (peut-être combiné à un [`useImperativeHandle`](/docs/hooks-reference.html#useimperativehandle)), ou vous pouvez convertir votre composant pour être à base de classe. Vous pouvez néanmoins **utiliser l'attribut `ref` dans une fonction composant**, tant que vous vous référez à un élément DOM ou un composant à base de classe : diff --git a/content/docs/testing-environments.md b/content/docs/testing-environments.md index 2f305ef97..cd71a9adf 100644 --- a/content/docs/testing-environments.md +++ b/content/docs/testing-environments.md @@ -29,11 +29,7 @@ Une large part des tests d’interface utilisateur (UI) peuvent être écrits de Si vous écrivez une bibliothèque qui doit tester principalement des comportements spécifiques aux navigateurs, et requiert donc des comportements natifs du navigateur tels que la mise en page ou de véritables champs de saisie, il vous faudra alors plutôt une solution comme [mocha](https://mochajs.org/). -<<<<<<< HEAD -Dans un environnement où vous _ne pouvez pas_ simuler un DOM (par exemple en testant des composants React Native depuis Node.js), vous pourriez opter pour des [utilitaires de simulation d’événements](https://reactjs.org/docs/test-utils.html#simulate), qui simulent les interactions avec les éléments. Une autre option consisterait à utiliser la fonction utilitaire `fireEvent` fournie par [`@testing-library/react-native`](https://testing-library.com/docs/native-testing-library). -======= -In an environment where you _can't_ simulate a DOM (e.g. testing React Native components on Node.js), you could use [event simulation helpers](/docs/test-utils.html#simulate) to simulate interactions with elements. Alternately, you could use the `fireEvent` helper from [`@testing-library/react-native`](https://testing-library.com/docs/native-testing-library). ->>>>>>> 4367566bddd06ed9dfbd6b1c3f45f9925e60b2c3 +Dans un environnement où vous _ne pouvez pas_ simuler un DOM (par exemple en testant des composants React Native depuis Node.js), vous pourriez opter pour des [utilitaires de simulation d’événements](/docs/test-utils.html#simulate), qui simulent les interactions avec les éléments. Une autre option consisterait à utiliser la fonction utilitaire `fireEvent` fournie par [`@testing-library/react-native`](https://testing-library.com/docs/native-testing-library). Les frameworks comme [Cypress](https://www.cypress.io/), [puppeteer](https://github.com/GoogleChrome/puppeteer) et [webdriver](https://www.seleniumhq.org/projects/webdriver/) sont quant à eux utiles pour exécuter des [tests de bout en bout](#end-to-end-tests-aka-e2e-tests). diff --git a/content/tutorial/tutorial.md b/content/tutorial/tutorial.md index 5acf1cebf..34b4071c4 100644 --- a/content/tutorial/tutorial.md +++ b/content/tutorial/tutorial.md @@ -37,11 +37,7 @@ Dans ce tutoriel, nous allons voir comment construire un jeu de morpion interact Vous pouvez voir ce que ça va donner ici : **[résultat final](https://codepen.io/gaearon/pen/gWWZgR?editors=0010)**. Si le code vous semble obscur, ou si vous n’êtes pas à l’aise avec la syntaxe du code, ne vous inquiétez pas ! C’est justement l’objectif de ce tutoriel de vous aider à comprendre React et sa syntaxe. -<<<<<<< HEAD Nous vous conseillons de jeter un coup d'œil à ce jeu de morpion avant de continuer ce tutoriel. Une des fonctionnalités que vous remarquerez, c’est qu’il affiche une liste numérotée sur la droite du plateau de jeu. Cette liste vous fournit un historique des tours de jeu, et elle est mise à jour au fil de l’eau. -======= -We recommend that you check out the tic-tac-toe game before continuing with the tutorial. One of the features that you'll notice is that there is a numbered list to the right of the game's board. This list gives you a history of all of the moves that have occurred in the game, and it is updated as the game progresses. ->>>>>>> 4367566bddd06ed9dfbd6b1c3f45f9925e60b2c3 Vous pouvez refermer le jeu de morpion une fois que vous en avez bien fait le tour. Nous commencerons par un gabarit plus simple pour ce tutoriel. Notre prochaine étape consiste à mettre le nécessaire en place, sur votre machine, pour que vous puissiez commencer à construire le jeu.