diff --git a/content/blog/2020-08-10-react-v17-rc.md b/content/blog/2020-08-10-react-v17-rc.md index 8e9f9e85f..d9d38119f 100644 --- a/content/blog/2020-08-10-react-v17-rc.md +++ b/content/blog/2020-08-10-react-v17-rc.md @@ -164,7 +164,7 @@ Most effects don't need to delay screen updates, so React runs them asynchronous However, when a component is unmounting, effect *cleanup* functions used to run synchronously (similar to `componentWillUnmount` being synchronous in classes). We've found that this is not ideal for larger apps because it slows down large screen transitions (e.g. switching tabs). -**In React 17, the effect cleanup function will always runs asynchronously -- for example, if the component is unmounting, the cleanup will run _after_ the screen has been updated.** +**In React 17, the effect cleanup function always runs asynchronously -- for example, if the component is unmounting, the cleanup runs _after_ the screen has been updated.** This mirrors how the effects themselves run more closely. In the rare cases where you might want to rely on the synchronous execution, you can switch to `useLayoutEffect` instead. @@ -272,20 +272,20 @@ We encourage you to try React 17.0 Release Candidate soon and [raise any issues] To install React 17 RC with npm, run: ```bash -npm install react@17.0.0-rc.2 react-dom@17.0.0-rc.2 +npm install react@17.0.0-rc.3 react-dom@17.0.0-rc.3 ``` To install React 17 RC with Yarn, run: ```bash -yarn add react@17.0.0-rc.2 react-dom@17.0.0-rc.2 +yarn add react@17.0.0-rc.3 react-dom@17.0.0-rc.3 ``` We also provide UMD builds of React via a CDN: ```html - - + + ``` Refer to the documentation for [detailed installation instructions](/docs/installation.html). @@ -356,6 +356,7 @@ Refer to the documentation for [detailed installation instructions](/docs/instal * Remove `unstable_discreteUpdates` and `unstable_flushDiscreteUpdates`. ([@trueadm](https://github.com/trueadm) in [#18825](https://github.com/facebook/react/pull/18825)) * Remove the `timeoutMs` argument. ([@acdlite](https://github.com/acdlite) in [#19703](https://github.com/facebook/react/pull/19703)) * Disable `
` prerendering in favor of a different future API. ([@acdlite](https://github.com/acdlite) in [#18917](https://github.com/facebook/react/pull/18917)) +* Add `unstable_expectedLoadTime` to Suspense for CPU-bound trees. ([@acdlite](https://github.com/acdlite) in [#19936](https://github.com/facebook/react/pull/19936)) * Add an experimental `unstable_useOpaqueIdentifier` Hook. ([@lunaruan](https://github.com/lunaruan) in [#17322](https://github.com/facebook/react/pull/17322)) * Add an experimental `unstable_startTransition` API. ([@rickhanlonii](https://github.com/rickhanlonii) in [#19696](https://github.com/facebook/react/pull/19696)) * Using `act` in the test renderer no longer flushes Suspense fallbacks. ([@acdlite](https://github.com/acdlite) in [#18596](https://github.com/facebook/react/pull/18596)) diff --git a/content/blog/2020-09-22-introducing-the-new-jsx-transform.md b/content/blog/2020-09-22-introducing-the-new-jsx-transform.md index 7999fd9c1..73ffce118 100644 --- a/content/blog/2020-09-22-introducing-the-new-jsx-transform.md +++ b/content/blog/2020-09-22-introducing-the-new-jsx-transform.md @@ -54,7 +54,7 @@ function App() { However, this is not perfect: -* Because JSX compiled into `React.createElement`, `React` needed to be in scope if you use JSX. +* Because JSX was compiled into `React.createElement`, `React` needed to be in scope if you used JSX. * There are some [performance improvements and simplifications](https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md#motivation) that `React.createElement` does not allow. To solve these issues, React 17 introduces two new entry points to the React package that are intended to only be used by compilers like Babel and TypeScript. Instead of transforming JSX to `React.createElement`, **the new JSX transform** automatically imports special functions from those new entry points in the React package and calls them. diff --git a/content/docs/design-principles.md b/content/docs/design-principles.md index 24a31cad6..a701066c1 100644 --- a/content/docs/design-principles.md +++ b/content/docs/design-principles.md @@ -92,7 +92,7 @@ Tenemos un chiste interno en el equipo de React acerca de que debería haberse l Proveer una buena experiencia de desarrollador es importante para nosotros. -Por ejemplo, mantenemos las herramientas de desarrollo de React ([React DevTools](https://github.com/facebook/react-devtools)) las cuales te permiten inspeccionar el árbol de componentes de React en Chrome y Firefox. Hemos oído que proveen un gran incremento de productividad a los ingenieros de Facebook y a la comunidad. +Por ejemplo, mantenemos las herramientas de desarrollo de React ([React DevTools](https://github.com/facebook/react/tree/master/packages/react-devtools)) las cuales te permiten inspeccionar el árbol de componentes de React en Chrome y Firefox. Hemos oído que proveen un gran incremento de productividad a los ingenieros de Facebook y a la comunidad. También tratamos de dar un extra para proveer advertencias útiles a los desarrolladores. Por ejemplo, React te advierte en desarrollo si anidas etiquetas de una forma que el navegador no las entiende, o si cometes un error de transcripción en la API. Las advertencias a desarrolladores y los chequeos relacionados son la razón principal por la que la versión de desarrollo de React es más lenta que la versión de producción. diff --git a/package.json b/package.json index cdbb0a724..edd1112ce 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "url": "git+https://github.com/reactjs/es.reactjs.org.git" }, "scripts": { - "build": "gatsby build", + "build": "gatsby clean && gatsby build", "check-all": "npm-run-all prettier generate-ids --parallel lint flow", "ci-check": "npm-run-all prettier:diff --parallel lint flow", "dev": "gatsby develop -H 0.0.0.0", diff --git a/vercel.json b/vercel.json new file mode 100644 index 000000000..d532a5bd6 --- /dev/null +++ b/vercel.json @@ -0,0 +1,43 @@ +{ + "github": { "silent": true }, + "trailingSlash": false, + "redirects": [ + { "source": "/tips/controlled-input-null-value.html", "destination": "/docs/forms.html#controlled-input-null-value", "permanent": false }, + { "source": "/concurrent", "destination": "/docs/concurrent-mode-intro.html", "permanent": false }, + { "source": "/hooks", "destination": "/docs/hooks-intro.html", "permanent": false }, + { "source": "/tutorial", "destination": "/tutorial/tutorial.html", "permanent": false }, + { "source": "/your-story", "destination": "https://www.surveymonkey.co.uk/r/MVQV2R9", "permanent": false }, + { "source": "/stories", "destination": "https://medium.com/react-community-stories", "permanent": false }, + { "source": "/html-jsx.html", "destination": "https://magic.reactjs.net/htmltojsx.htm", "destination": "", "permanent": false }, + { "source": "/link/attribute-behavior", "destination": "/blog/2017/09/08/dom-attributes-in-react-16.html#changes-in-detail", "permanent": false }, + { "source": "/link/controlled-components", "destination": "/docs/forms.html#controlled-components", "permanent": false }, + { "source": "/link/crossorigin-error", "destination": "/docs/cross-origin-errors.html", "permanent": false }, + { "source": "/link/dangerously-set-inner-html", "destination": "/docs/dom-elements.html#dangerouslysetinnerhtml", "permanent": false }, + { "source": "/link/derived-state", "destination": "/blog/2018/06/07/you-probably-dont-need-derived-state.html", "permanent": false }, + { "source": "/link/error-boundaries", "destination": "/docs/error-boundaries.html", "permanent": false }, + { "source": "/link/event-pooling", "destination": "/docs/events.html#event-pooling", "permanent": false }, + { "source": "/link/hooks-data-fetching", "destination": "/docs/hooks-faq.html#how-can-i-do-data-fetching-with-hooks", "permanent": false }, + { "source": "/link/invalid-aria-props", "destination": "/warnings/invalid-aria-prop.html", "permanent": false }, + { "source": "/link/invalid-hook-call", "destination": "/warnings/invalid-hook-call-warning.html", "permanent": false }, + { "source": "/link/legacy-context", "destination": "/docs/legacy-context.html", "permanent": false }, + { "source": "/link/legacy-factories", "destination": "/warnings/legacy-factories.html", "permanent": false }, + { "source": "/link/mock-scheduler", "destination": "/docs/testing-environments.html#mocking-a-rendering-surface", "destination": "", "permanent": false }, + { "source": "/link/perf-use-production-build", "destination": "/docs/optimizing-performance.html#use-the-production-build", "permanent": false }, + { "source": "/link/react-devtools", "destination": "/blog/2015/09/02/new-react-developer-tools.html#installation", "permanent": false }, + { "source": "/link/react-polyfills", "destination": "/docs/javascript-environment-requirements.html", "permanent": false }, + { "source": "/link/refs-must-have-owner", "destination": "/warnings/refs-must-have-owner.html", "permanent": false }, + { "source": "/link/rules-of-hooks", "destination": "/docs/hooks-rules.html", "permanent": false }, + { "source": "/link/special-props", "destination": "/warnings/special-props.html", "permanent": false }, + { "source": "/link/strict-mode-find-node", "destination": "/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage", "permanent": false }, + { "source": "/link/strict-mode-string-ref", "destination": "/docs/refs-and-the-dom.html#legacy-api-string-refs", "permanent": false }, + { "source": "/link/unsafe-component-lifecycles", "destination": "/blog/2018/03/27/update-on-async-rendering.html", "permanent": false }, + { "source": "/link/warning-keys", "destination": "/docs/lists-and-keys.html#keys", "permanent": false }, + { "source": "/link/wrap-tests-with-act", "destination": "/docs/test-utils.html#act", "permanent": false }, + { "source": "/link/interaction-tracing", "destination": "https://gist.github.com/bvaughn/8de925562903afd2e7a12554adcdda16", "permanent": false }, + { "source": "/link/profiling", "destination": "https://gist.github.com/bvaughn/25e6233aeb1b4f0cdb8d8366e54a3977", "permanent": false }, + { "source": "/link/test-utils-mock-component", "destination": "https://gist.github.com/bvaughn/fbf41b3f895bf2d297935faa5525eee9", "permanent": false }, + { "source": "/link/uselayouteffect-ssr", "destination": "https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85", "permanent": false }, + { "source": "/link/react-devtools-faq", "destination": "https://github.com/facebook/react/tree/master/packages/react-devtools#faq", "permanent": false }, + { "source": "/link/setstate-in-render", "destination": "https://github.com/facebook/react/issues/18178#issuecomment-595846312", "permanent": false } + ] +}