diff --git a/TRANSLATION.md b/TRANSLATION.md index d0f21baaa..db42cae0d 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -61,6 +61,14 @@ داده + + + + element + + + المنت + @@ -243,6 +251,11 @@ RFC + + + + scope + @@ -268,4 +281,4 @@

اگر فکر می‌کنید چیزی فراموش شده‌است یا نیاز به تصحیح دارد، حتما نظر خود را با ما درمیان بگذارید. -

\ No newline at end of file +

diff --git a/content/community/conferences.md b/content/community/conferences.md index ea8613c78..0c94b6c2a 100644 --- a/content/community/conferences.md +++ b/content/community/conferences.md @@ -52,10 +52,10 @@ June 21, 2019 Chicago, Illinois USA [Website](https://reactloop.com) - [Twitter](https://twitter.com/ReactLoop) -### React Week '19 {#RWNY19} -July 15-21, 2019. New York City, USA +### Chain React 2019 +July 11-12, 2019. Portland, OR, USA. -[Website](https://reactweek.nyc) - [Twitter](https://twitter.com/ReactWeek) +[Website](https://infinite.red/ChainReactConf) ### React Rally 2019 August 22-23, 2019. Salt Lake City, USA. @@ -64,6 +64,7 @@ August 22-23, 2019. Salt Lake City, USA. ### ComponentsConf 2019 {#componentsconf-2019} September 6, 2019 in Melbourne, Australia + [Website](https://www.componentsconf.com.au/) - [Twitter](https://twitter.com/componentsconf) ### React Native EU 2019 {#react-native-eu-2019} diff --git a/content/community/meetups.md b/content/community/meetups.md index d397a4535..8bd1155d0 100644 --- a/content/community/meetups.md +++ b/content/community/meetups.md @@ -88,6 +88,7 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet ## Pakistan {#pakistan} * [Karachi](https://www.facebook.com/groups/902678696597634/) +* [Lahore](https://www.facebook.com/groups/ReactjsLahore/) ## Peru {#peru} * [Lima](https://www.meetup.com/ReactJS-Peru/) @@ -130,8 +131,8 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet * [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 - ReactNYC](https://www.meetup.com/ReactNYC/) * [Palo Alto, CA - React Native](https://www.meetup.com/React-Native-Silicon-Valley/) +* [Philadelphia, PA - ReactJS](https://www.meetup.com/RQ-React/) * [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/) diff --git a/content/docs/conditional-rendering.md b/content/docs/conditional-rendering.md index 7df19bb98..b2b3891ec 100644 --- a/content/docs/conditional-rendering.md +++ b/content/docs/conditional-rendering.md @@ -1,6 +1,6 @@ --- id: conditional-rendering -title: Conditional Rendering +title: رندر شرطی permalink: docs/conditional-rendering.html prev: handling-events.html next: lists-and-keys.html @@ -8,11 +8,12 @@ redirect_from: - "tips/false-in-jsx.html" --- -In React, you can create distinct components that encapsulate behavior you need. Then, you can render only some of them, depending on the state of your application. + در ری اکت، شما می‌توانید کامپوننت‌های مجزایی بسازید تا رفتار مورد نیاز شما را کپسوله سازی کنند. سپس می‌توانید بعضی از این کامپوننت‌ها را، بسته به state برنامه، رندر کنید . -Conditional rendering in React works the same way conditions work in JavaScript. Use JavaScript operators like [`if`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) or the [conditional operator](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Conditional_Operator) to create elements representing the current state, and let React update the UI to match them. +رندر شرطی در ری اکت دقیقا مشابه «شرط‌ها» در جاوا‌اسکریپت کار میکند. +از عملگر‌های جاوااسکریپت مثل کلمه کلیدی [`if`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) یا عملگر شرطی [conditional operator](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Conditional_Operator) برای ایجاد المنت‌هایی که state کنونی را نشان می‌دهند، استفاده کنید و بگذارید ری اکت UI را بروزرسانی کند تا با این شرط ها منطبق شود. -Consider these two components: +این دو کامپوننت را در نظر بگیرید: ```js function UserGreeting(props) { @@ -24,7 +25,7 @@ function GuestGreeting(props) { } ``` -We'll create a `Greeting` component that displays either of these components depending on whether a user is logged in: + در ادامه ما یک کامپوننت تحت عنوان `Greeting` می‌سازیم، که یکی از دو کامپوننت اشاره شده در بالا را بر حسب اینکه یک کاربر لاگین کرده یا خیر، نشان می‌دهد: ```javascript{3-7,11,12} function Greeting(props) { @@ -36,21 +37,21 @@ function Greeting(props) { } ReactDOM.render( - // Try changing to isLoggedIn={true}: + //در خط زیر مقدار isLoggedIn را به true تغییر دهید‌‌(isLoggedIn={true}): , document.getElementById('root') ); ``` -[**Try it on CodePen**](https://codepen.io/gaearon/pen/ZpVxNq?editors=0011) +[**کد بالا را در CodePen امتحان کنید**](https://codepen.io/gaearon/pen/ZpVxNq?editors=0011) -This example renders a different greeting depending on the value of `isLoggedIn` prop. +در مثال بالا، هر بار یک پیام خوش آمد‌گویی متفاوت بر‌اساس مقدارprop ای که `isLoggedIn` نام دارد، رندر می‌شود. -### Element Variables {#element-variables} +### متغیر‌های المان‌ها {#element-variables} -You can use variables to store elements. This can help you conditionally render a part of the component while the rest of the output doesn't change. +برای ذخیره سازی المان‌ها می‌توان از متغیرها کمک گرفت، استفاده از این روش باعث می‌شود تا بتوان بخشی از یک کامپوننت را به‌صورت شرطی، رندر کرده در حالیکه بقیه خروجی کامپوننت تغییری نمی‌کند. -Consider these two new components representing Logout and Login buttons: +این دو کامپوننت جدید رو در نظر بگیرید که به ترتیب نمایانگر دکمه ورود (Login) و خروج (Logout) هستند. ```js function LoginButton(props) { @@ -70,9 +71,10 @@ function LogoutButton(props) { } ``` -In the example below, we will create a [stateful component](/docs/state-and-lifecycle.html#adding-local-state-to-a-class) called `LoginControl`. +در مثال زیر، یک [ کامپوننتstateful](/docs/state-and-lifecycle.html#adding-local-state-to-a-class) + به نام`LoginControl` می‌سازیم. -It will render either `` or `` depending on its current state. It will also render a `` from the previous example: +این کامپوننت براساس state کنونی اش، یکی از کامپوننت‌های `` یا`` را رندر می‌کند. ```javascript{20-25,29,30} class LoginControl extends React.Component { @@ -116,13 +118,13 @@ ReactDOM.render( ); ``` -[**Try it on CodePen**](https://codepen.io/gaearon/pen/QKzAgB?editors=0010) +[**این کد را در CodePen امتحان کنید**](https://codepen.io/gaearon/pen/QKzAgB?editors=0010) -While declaring a variable and using an `if` statement is a fine way to conditionally render a component, sometimes you might want to use a shorter syntax. There are a few ways to inline conditions in JSX, explained below. +در حالیکه روش تعریف یک متغیر و استفاده از عبارت شرطی `if`، یک روش خوب برای رندر شرطی است؛ گاهی ممکن است شما نیاز به یک syntax کوتاه‌تر داشته باشید. چندین روش برای شرط های خطی در JSX وجود دارد که در زیر توضیح داده شده است: -### Inline If with Logical && Operator {#inline-if-with-logical--operator} +### If خطی بااستفاده از اپراتور && منطقی {#inline-if-with-logical--operator} -You may [embed any expressions in JSX](/docs/introducing-jsx.html#embedding-expressions-in-jsx) by wrapping them in curly braces. This includes the JavaScript logical `&&` operator. It can be handy for conditionally including an element: +شما می‌توانید هر عبارتی (شامل عملگر ‍‍‍‍`&&` منطقی در جاوااسکریپت)‌را در JSX با استفاده از یک جفت `{}`،‌استفاده کنید:‌ر.ک. [embed any expressions in JSX](/docs/introducing-jsx.html#embedding-expressions-in-jsx)؛ استفاده از این روش برای اضافه کردن یک المان به‌صورت شرطی، میتواند مفید باشد: ```js{6-10} function Mailbox(props) { @@ -146,17 +148,16 @@ ReactDOM.render( ); ``` -[**Try it on CodePen**](https://codepen.io/gaearon/pen/ozJddz?editors=0010) +[**این کد را در CodePen امتحان کنید**](https://codepen.io/gaearon/pen/ozJddz?editors=0010) -It works because in JavaScript, `true && expression` always evaluates to `expression`, and `false && expression` always evaluates to `false`. +این روش جواب می‌دهد چرا که در جاوااسکریپت، حاصل `true && عبارت` همیشه برابر است با `عبارت` و همچنین حاصل `false && عبارت` ‍‍ همیشه برابر است با `false`. بنابراین اگر شرط برابر با `true` باشد، المانی که بلافاصله بعد از عملگر `&&` قرار گرفته است در خروجی نمایش داده خواهد شد و اگر حاصل شرط برابر با`false` باشد،‌ری‌اکت این عبارت را نادیده می‌گیرد. -Therefore, if the condition is `true`, the element right after `&&` will appear in the output. If it is `false`, React will ignore and skip it. +### If-Else خطی با عملگر شرطی {#inline-if-else-with-conditional-operator} -### Inline If-Else with Conditional Operator {#inline-if-else-with-conditional-operator} +روش دیگری که برای رندر شرطی المان‌ها به‌صورت خطی استفاده می‌شود،‌استفاده از عملگر شرطی جاوااسکریپت [`condition ? true : false`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Conditional_Operator) + است. -Another method for conditionally rendering elements inline is to use the JavaScript conditional operator [`condition ? true : false`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Conditional_Operator). - -In the example below, we use it to conditionally render a small block of text. +در مثال زیر ما از این روش استفاده می‌کنیم تا متن کوتاهی را به‌صورت شرطی رندر کنیم. ```javascript{5} render() { @@ -169,7 +170,7 @@ render() { } ``` -It can also be used for larger expressions although it is less obvious what's going on: +از این روش همچنین می‌توان برای عبارات شرطی طولانی‌تر استفاده نمود، اگرچه که در اینصورت کمتر مشخص است که در کد نوشته شده چه اتفاقی افتاده است: ```js{5,7,9} render() { @@ -186,13 +187,14 @@ render() { } ``` -Just like in JavaScript, it is up to you to choose an appropriate style based on what you and your team consider more readable. Also remember that whenever conditions become too complex, it might be a good time to [extract a component](/docs/components-and-props.html#extracting-components). +درست مثل زبان جاوااسکریپت،انتخاب اینکه کدام روش مناسب است، به نظر شما و تیم شما بستگی دارد که کدام روش برای شما خوانا‌تر است.‌همچنین این نکته را در نظر داشته باشید که هرگاه شرط‌ها بیش از انداره پیچیده شدند،بهتر است که از روش [استخراج یک کامپوننت](/docs/components-and-props.html#extracting-components) استفاده کنید. + +### جلوگیری از رندر شدن یک کامپوننت {#preventing-component-from-rendering} -### Preventing Component from Rendering {#preventing-component-from-rendering} +گاهی پیش می‌آید که بخواهید یک کامپوننت-حتی اگر توسط یک کامپوننت دیگر رندر شده باشد- خودش را مخفی کند. برای انجام این کار، عبارت `null` را به‌جای خروجی تابع رندر کامپوننت برگردانید. -In rare cases you might want a component to hide itself even though it was rendered by another component. To do this return `null` instead of its render output. +در مثال زیر، کامپوننت `` بر‌اساس مقدار prop ای به‌نام `warn` رندر می‌شود. اگر مقدار این prop برابر با`false` باشد، در اینصورت این کامپوننت رندر نخواهد شد. -In the example below, the `` is rendered depending on the value of the prop called `warn`. If the value of the prop is `false`, then the component does not render: ```javascript{2-4,29} function WarningBanner(props) { @@ -238,6 +240,6 @@ ReactDOM.render( ); ``` -[**Try it on CodePen**](https://codepen.io/gaearon/pen/Xjoqwm?editors=0010) +[**این کد را در CodePen امتحان کنید**](https://codepen.io/gaearon/pen/Xjoqwm?editors=0010) -Returning `null` from a component's `render` method does not affect the firing of the component's lifecycle methods. For instance `componentDidUpdate` will still be called. +برگرداندن مقدار `null`از متد `render` یک کامپوننت، نحوه فراخوانی و اجرای متد‌های lifecycle کامپونتت را تحت تاثیر قرار نمی‌دهد.‌برای مثال متد `componentDidUpdate` همچنان فراخوانی خواهد شد. \ No newline at end of file diff --git a/content/docs/hello-world.md b/content/docs/hello-world.md index 2fff80254..a14461e79 100644 --- a/content/docs/hello-world.md +++ b/content/docs/hello-world.md @@ -1,12 +1,12 @@ --- id: hello-world -title: Hello World +title: سلام دنیا permalink: docs/hello-world.html prev: cdn-links.html next: introducing-jsx.html --- -The smallest React example looks like this: +کوچکترین مثال ری‌اکت شبیه این است: ```js ReactDOM.render( @@ -14,37 +14,34 @@ ReactDOM.render( document.getElementById('root') ); ``` +این مثال یک عنوان را روی صفحه نمایش می‌دهد که می‌گوید: "Hello, world!" -It displays a heading saying "Hello, world!" on the page. +**[روی CodePen امتحان کنید](codepen://hello-world)** -[](codepen://hello-world) +روی لینک بالا کلیک کنید تا یک ویرایشگر آنلاین باز شود. هر تغییری که می‌خواهید اعمال کنید و تاثیر آن را بر خروجی مشاهده کنید. بیشتر صفحات در این راهنما، مثال‌های قابل ویرایشی مانند بالا دارند. -Click the link above to open an online editor. Feel free to make some changes, and see how they affect the output. Most pages in this guide will have editable examples like this one. +## چگونه این راهنما را بخوانیم {#how-to-read-this-guide} -## How to Read This Guide {#how-to-read-this-guide} +در این راهنما، ما به بررسی اجزا سازنده برنامه‌های ری‌اکت یعنی: المنت‌ها و کامپوننت‌ها می‌پردازیم. زمانی که شما به آن‌ها مسلط شوید، می‌توانید برنامه‌های پیچیده را از تکه‌های کوچکتر با قابلیت استفاده مجدد بسازید. -In this guide, we will examine the building blocks of React apps: elements and components. Once you master them, you can create complex apps from small reusable pieces. - ->Tip +>راهنما > ->This guide is designed for people who prefer **learning concepts step by step**. If you prefer to learn by doing, check out our [practical tutorial](/tutorial/tutorial.html). You might find this guide and the tutorial complementary to each other. - -This is the first chapter in a step-by-step guide about main React concepts. You can find a list of all its chapters in the navigation sidebar. If you're reading this from a mobile device, you can access the navigation by pressing the button in the bottom right corner of your screen. +>این راهنما برای افرادی طراحی شده‌است که ترجیح می‌دهند **مفاهیم را گام‌به‌گام بیاموزند**. اگر شما ترجیح می‌دهید به وسیله انجام‌دادن یاد بگیرید، به [آموزش عملی](/tutorial/tutorial.html) ما نگاهی بیاندازید. شاید این راهنما و آن آموزش برای شما مکمل یکدیگر باشند. -Every chapter in this guide builds on the knowledge introduced in earlier chapters. **You can learn most of React by reading the “Main Concepts” guide chapters in the order they appear in the sidebar.** For example, [“Introducing JSX”](/docs/introducing-jsx.html) is the next chapter after this one. +این اولین فصل از راهنمای گام‌به‌گام درباره مفاهیم اصلی ری‌اکت است. شما می‌توانید لیستی از تمام سرفصل‌ها را در نوار کناری مشاهده‌ کنید. اگر با موبایل درحال خواندن این راهنما هستید، با زدن دکمه در گوشه پایین سمت چپ صفحه می‌توانید به منو دسترسی پیدا کنید. -## Knowledge Level Assumptions {#knowledge-level-assumptions} +هر فصل در این راهنما براساس دانش معرفی‌شده در فصل‌های پیشین بنا می‌شود. **شما می‌توانید بیشتر ری‌اکت را با مطالعه فصل‌های راهنمای "مفاهیم اصلی" به ترتیبی که در نوار کناری آورده‌‌ شده است، یاد بگیرید.** برای مثال، [“مقدمه‌ای بر JSX”](/docs/introducing-jsx.html) فصل بعدی بعد از این فصل است. -React is a JavaScript library, and so we'll assume you have a basic understanding of the JavaScript language. **If you don't feel very confident, we recommend [going through a JavaScript tutorial](https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript) to check your knowledge level** and enable you to follow along this guide without getting lost. It might take you between 30 minutes and an hour, but as a result you won't have to feel like you're learning both React and JavaScript at the same time. ->Note -> ->This guide occasionally uses some of the newer JavaScript syntax in the examples. If you haven't worked with JavaScript in the last few years, [these three points](https://gist.github.com/gaearon/683e676101005de0add59e8bb345340c) should get you most of the way. +## فرض‌های سطح دانش {#knowledge-level-assumptions} +ری‌اکت یک کتابخانه جاوااسکریپت است، و بنابراین ما فرض می‌کنیم که شما درک پایه‌ای از زبان جاوااسکریپت دارید. **اگر خیلی مطمئن نیستید، پیشنهاد می‌کنیم [یک آموزش جاوااسکریپت را طی کنید](https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript) تا سطح دانش خود را بررسی کنید** و بتوانید این راهنما را بدون گمراهی دنبال کنید. این کار ممکن است برای شما بین ۳۰ دقیقه تا یک ساعت به طول بیانجامد، اما در نتیجه این حس را نخواهید داشت که [با خواندن این راهنما] ری‌اکت و جاوااسکریپت را همزمان یاد می‌گیرید. -## Let's Get Started! {#lets-get-started} - -Keep scrolling down, and you'll find the link to the [next chapter of this guide](/docs/introducing-jsx.html) right before the website footer. +>نکته +> +>این راهنما در اغلب مثال‌ها از نگارش جدید جاوااسکریپت استفاده می‌کند. اگر در چند سال اخیر با جاوااسکریپت کار نکرده‌اید، [این سه مورد](https://gist.github.com/gaearon/683e676101005de0add59e8bb345340c) بیشتر موارد را به شما یاد می‌دهد. +## بیایید شروع کنیم! {#lets-get-started} +به پایین اسکرول کردن ادامه دهید و لینک [فصل بعدی این راهنما](/docs/introducing-jsx.html) را پیش از footer وبسایت پیدا می‌کنید. diff --git a/content/docs/hooks-reference.md b/content/docs/hooks-reference.md index 98c2e14c0..24145eac2 100644 --- a/content/docs/hooks-reference.md +++ b/content/docs/hooks-reference.md @@ -67,7 +67,7 @@ function Counter({initialCount}) { } ``` -The "+" and "-" buttons use the functional form, because the updated value is based on the previous value. But the "Reset" button uses the normal form, because it always sets the count back to 0. +The "+" and "-" buttons use the functional form, because the updated value is based on the previous value. But the "Reset" button uses the normal form, because it always sets the count back to the initial value. > Note > diff --git a/content/docs/optimizing-performance.md b/content/docs/optimizing-performance.md index e42bad7b7..959332976 100644 --- a/content/docs/optimizing-performance.md +++ b/content/docs/optimizing-performance.md @@ -430,6 +430,6 @@ x === z; // true In this case, since a new reference is returned when mutating `x`, we can use a reference equality check `(x === y)` to verify that the new value stored in `y` is different than the original value stored in `x`. -Two other libraries that can help use immutable data are [seamless-immutable](https://github.com/rtfeldman/seamless-immutable) and [immutability-helper](https://github.com/kolodny/immutability-helper). +Other libraries that can help use immutable data include [Immer](https://github.com/mweststrate/immer), [immutability-helper](https://github.com/kolodny/immutability-helper), and [seamless-immutable](https://github.com/rtfeldman/seamless-immutable). Immutable data structures provide you with a cheap way to track changes on objects, which is all we need to implement `shouldComponentUpdate`. This can often provide you with a nice performance boost. diff --git a/content/docs/reference-glossary.md b/content/docs/reference-glossary.md index e91fa9eef..bdf3587a5 100644 --- a/content/docs/reference-glossary.md +++ b/content/docs/reference-glossary.md @@ -122,7 +122,7 @@ class Welcome extends React.Component { A component needs `state` when some data associated with it changes over time. For example, a `Checkbox` component might need `isChecked` in its state, and a `NewsFeed` component might want to keep track of `fetchedPosts` in its state. -The most important difference between `state` and `props` is that `props` are passed from a parent component, but `state` is managed by the component itself. A component cannot change its `props`, but it can change its `state`. To do so, it must call `this.setState()`. Only components defined as classes can have state. +The most important difference between `state` and `props` is that `props` are passed from a parent component, but `state` is managed by the component itself. A component cannot change its `props`, but it can change its `state`. For each particular piece of changing data, there should be just one component that "owns" it in its state. Don't try to synchronize states of two different components. Instead, [lift it up](/docs/lifting-state-up.html) to their closest shared ancestor, and pass it down as props to both of them. diff --git a/content/docs/state-and-lifecycle.md b/content/docs/state-and-lifecycle.md index e6d85ae57..8c1622598 100644 --- a/content/docs/state-and-lifecycle.md +++ b/content/docs/state-and-lifecycle.md @@ -72,9 +72,6 @@ ReactDOM.render( state مشابه props است، اما خصوصی است و کاملا توسط کامپوننت کنترل می‌شود. -ما [قبلا ذکر کردیم](/docs/components-and-props.html#functional-and-class-components) به کامپوننت‌هایی که به صورت کلاس تعریف می‌شوند، قابلیت‌هایی افزوده می‌شود. state داخلی دقیقا همان است: قابلیتی که فقط برای کلاس‌ها موجود است. - - ## تبدیل یک تابع به یک کلاس {#converting-a-function-to-a-class} شما می‌توانید یک کامپوننت برپایه تابع را در پنج مرحله به یک کلاس تبدیل کنید: diff --git a/content/languages.yml b/content/languages.yml index 5e0958260..a7fe36f1f 100644 --- a/content/languages.yml +++ b/content/languages.yml @@ -66,15 +66,23 @@ - name: Italian translated_name: Italiano code: it - status: 0 + status: 2 - name: Japanese translated_name: 日本語 code: ja status: 2 +- name: Georgian + translated_name: ქართული + code: ka + status: 0 - name: Central Khmer translated_name: ភាសាខ្មែរ code: km status: 0 +- name: Kannada + translated_name: ಕನ್ನಡ + code: kn + status: 0 - name: Korean translated_name: 한국어 code: ko @@ -126,6 +134,7 @@ - name: Swedish translated_name: Svenska code: sv + status: 0 - name: Tamil translated_name: தமிழ் code: ta @@ -134,10 +143,14 @@ translated_name: తెలుగు code: te status: 0 +- name: Thai + translated_name: ไทย + code: th + status: 0 - name: Turkish translated_name: Türkçe code: tr - status: 1 + status: 2 - name: Ukrainian translated_name: Українська code: uk @@ -157,8 +170,8 @@ - name: Simplified Chinese translated_name: 简体中文 code: zh-hans - status: 1 + status: 2 - name: Traditional Chinese translated_name: 繁體中文 code: zh-hant - status: 0 + status: 1 diff --git a/package.json b/package.json index f1628e72e..3e255133b 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "normalize.css": "^8.0.0", "prettier": "^1.7.4", "prismjs": "^1.15.0", - "react": "16.8.3", - "react-dom": "16.8.3", + "react": "16.8.6", + "react-dom": "16.8.6", "react-helmet": "^5.2.0", "react-live": "1.8.0-0", "remarkable": "^1.7.1", diff --git a/src/site-constants.js b/src/site-constants.js index f26103279..4618432e0 100644 --- a/src/site-constants.js +++ b/src/site-constants.js @@ -8,7 +8,7 @@ // NOTE: We can't just use `location.toString()` because when we are rendering // the SSR part in node.js we won't have a proper location. const urlRoot = 'https://reactjs.org'; -const version = '16.8.4'; +const version = '16.8.6'; const babelURL = 'https://unpkg.com/babel-standalone@6.26.0/babel.min.js'; export {babelURL, urlRoot, version}; diff --git a/src/theme.js b/src/theme.js index 4f8f3af89..618e0bbfa 100644 --- a/src/theme.js +++ b/src/theme.js @@ -408,6 +408,10 @@ const sharedStyles = { marginTop: 0, }, }, + + '& .gatsby-highlight': { + marginLeft: 0, + }, }, '& .gatsby-highlight + blockquote': { diff --git a/yarn.lock b/yarn.lock index a3859f100..246285339 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10220,15 +10220,15 @@ react-dev-utils@^4.2.1: strip-ansi "3.0.1" text-table "0.2.0" -react-dom@16.8.3: - version "16.8.3" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.3.tgz#ae236029e66210783ac81999d3015dfc475b9c32" - integrity sha512-ttMem9yJL4/lpItZAQ2NTFAbV7frotHk5DZEHXUOws2rMmrsvh1Na7ThGT0dTzUIl6pqTOi5tYREfL8AEna3lA== +react-dom@16.8.6: + version "16.8.6" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.6.tgz#71d6303f631e8b0097f56165ef608f051ff6e10f" + integrity sha512-1nL7PIq9LTL3fthPqwkvr2zY7phIPjYrT0jp4HjyEQrEROnw4dG41VVwi/wfoCneoleqrNX7iAD+pXebJZwrwA== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" prop-types "^15.6.2" - scheduler "^0.13.3" + scheduler "^0.13.6" react-error-overlay@^3.0.0: version "3.0.0" @@ -10282,15 +10282,15 @@ react-side-effect@^1.1.0: exenv "^1.2.1" shallowequal "^1.0.1" -react@16.8.3: - version "16.8.3" - resolved "https://registry.yarnpkg.com/react/-/react-16.8.3.tgz#c6f988a2ce895375de216edcfaedd6b9a76451d9" - integrity sha512-3UoSIsEq8yTJuSu0luO1QQWYbgGEILm+eJl2QN/VLDi7hL+EN18M3q3oVZwmVzzBJ3DkM7RMdRwBmZZ+b4IzSA== +react@16.8.6: + version "16.8.6" + resolved "https://registry.yarnpkg.com/react/-/react-16.8.6.tgz#ad6c3a9614fd3a4e9ef51117f54d888da01f2bbe" + integrity sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" prop-types "^15.6.2" - scheduler "^0.13.3" + scheduler "^0.13.6" read-all-stream@^3.0.0: version "3.1.0" @@ -10964,10 +10964,10 @@ sax@>=0.6.0, sax@^1.2.4, sax@~1.2.1, sax@~1.2.4: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -scheduler@^0.13.3: - version "0.13.3" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.3.tgz#bed3c5850f62ea9c716a4d781f9daeb9b2a58896" - integrity sha512-UxN5QRYWtpR1egNWzJcVLk8jlegxAugswQc984lD3kU7NuobsO37/sRfbpTdBjtnD5TBNFA2Q2oLV5+UmPSmEQ== +scheduler@^0.13.6: + version "0.13.6" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.6.tgz#466a4ec332467b31a91b9bf74e5347072e4cd889" + integrity sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1"