Browse Source

[Beta] Upgrade to MDX 2 (#5107)

* [Beta] MDX 2

* Fix up old pages
main
dan 2 years ago
committed by GitHub
parent
commit
b59b64f386
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      beta/next.config.js
  2. 5
      beta/package.json
  3. 8
      beta/plugins/remark-header-custom-ids.js
  4. 2
      beta/scripts/headingIDHelpers/generateHeadingIDs.js
  5. 51
      beta/src/components/MDX/CodeBlock/CodeBlock.tsx
  6. 12
      beta/src/components/MDX/CodeBlock/index.tsx
  7. 8
      beta/src/components/MDX/CodeDiagram.tsx
  8. 6
      beta/src/components/MDX/MDXComponents.tsx
  9. 2
      beta/src/components/MDX/PackageImport.tsx
  10. 6
      beta/src/components/MDX/Sandpack/createFileMap.ts
  11. 2
      beta/src/content/apis/react/useContext.md
  12. 10
      beta/src/content/blog/2014/02/16/react-v0.9-rc1.md
  13. 10
      beta/src/content/blog/2014/02/20/react-v0.9.md
  14. 10
      beta/src/content/blog/2014/03/19/react-v0.10-rc1.md
  15. 10
      beta/src/content/blog/2014/03/21/react-v0.10.md
  16. 10
      beta/src/content/blog/2014/07/13/react-v0.11-rc1.md
  17. 10
      beta/src/content/blog/2014/07/17/react-v0.11.md
  18. 10
      beta/src/content/blog/2014/07/25/react-v0.11.1.md
  19. 4
      beta/src/content/blog/2014/08/03/community-roundup-21.md
  20. 2
      beta/src/content/blog/2014/09/03/introducing-the-jsx-specification.md
  21. 10
      beta/src/content/blog/2014/09/16/react-v0.11.2.md
  22. 10
      beta/src/content/blog/2014/10/16/react-v0.12-rc1.md
  23. 12
      beta/src/content/blog/2014/10/28/react-v0.12.md
  24. 10
      beta/src/content/blog/2014/12/18/react-v0.12.2.md
  25. 2
      beta/src/content/blog/2014/12/19/react-js-conf-diversity-scholarship.md
  26. 10
      beta/src/content/blog/2015/02/24/react-v0.13-rc1.md
  27. 2
      beta/src/content/blog/2015/02/24/streamlining-react-elements.md
  28. 10
      beta/src/content/blog/2015/03/03/react-v0.13-rc2.md
  29. 10
      beta/src/content/blog/2015/03/10/react-v0.13.md
  30. 10
      beta/src/content/blog/2015/03/16/react-v0.13.1.md
  31. 10
      beta/src/content/blog/2015/04/18/react-v0.13.2.md
  32. 10
      beta/src/content/blog/2015/05/08/react-v0.13.3.md
  33. 12
      beta/src/content/blog/2015/09/10/react-v0.14-rc1.md
  34. 12
      beta/src/content/blog/2015/10/07/react-v0.14.md
  35. 12
      beta/src/content/blog/2015/10/28/react-v0.14.1.md
  36. 12
      beta/src/content/blog/2015/11/02/react-v0.14.2.md
  37. 16
      beta/src/content/blog/2015/11/18/react-v0.14.3.md
  38. 2
      beta/src/content/blog/2015/12/04/react-js-conf-2016-diversity-scholarship.md
  39. 16
      beta/src/content/blog/2015/12/29/react-v0.14.4.md
  40. 12
      beta/src/content/blog/2016/03/07/react-v15-rc1.md
  41. 12
      beta/src/content/blog/2016/03/16/react-v15-rc2.md
  42. 16
      beta/src/content/blog/2016/03/29/react-v0.14.8.md
  43. 12
      beta/src/content/blog/2016/04/07/react-v15.md
  44. 12
      beta/src/content/blog/2016/04/08/react-v15.0.1.md
  45. 4
      beta/src/content/community/index.md
  46. 1
      beta/src/content/learn/referencing-values-with-refs.md
  47. 8
      beta/src/content/learn/responding-to-events.md
  48. 4
      beta/src/content/learn/scaling-up-with-reducer-and-context.md
  49. 2
      beta/src/content/learn/updating-arrays-in-state.md
  50. 36
      beta/src/pages/[[...markdownPath]].js
  51. 1317
      beta/yarn.lock

1
beta/next.config.js

@ -3,7 +3,6 @@
*/ */
const path = require('path'); const path = require('path');
const {remarkPlugins} = require('./plugins/markdownToHtml');
const redirects = require('./src/redirects.json'); const redirects = require('./src/redirects.json');
/** /**

5
beta/package.json

@ -37,13 +37,14 @@
"parse-numeric-range": "^1.2.0", "parse-numeric-range": "^1.2.0",
"react": "0.0.0-experimental-cb5084d1c-20220924", "react": "0.0.0-experimental-cb5084d1c-20220924",
"react-collapsed": "npm:@gaearon/react-collapsed@3.1.0-forked.1", "react-collapsed": "npm:@gaearon/react-collapsed@3.1.0-forked.1",
"react-dom": "0.0.0-experimental-cb5084d1c-20220924" "react-dom": "0.0.0-experimental-cb5084d1c-20220924",
"remark-gfm": "^3.0.1"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.12.9", "@babel/core": "^7.12.9",
"@babel/plugin-transform-modules-commonjs": "^7.18.6", "@babel/plugin-transform-modules-commonjs": "^7.18.6",
"@babel/preset-react": "^7.18.6", "@babel/preset-react": "^7.18.6",
"@mdx-js/mdx": "^1.6.22", "@mdx-js/mdx": "^2.1.3",
"@types/body-scroll-lock": "^2.6.1", "@types/body-scroll-lock": "^2.6.1",
"@types/classnames": "^2.2.10", "@types/classnames": "^2.2.10",
"@types/debounce": "^1.2.1", "@types/debounce": "^1.2.1",

8
beta/plugins/remark-header-custom-ids.js

@ -41,14 +41,6 @@ module.exports = ({
if (tail && tail.type === 'emphasis') { if (tail && tail.type === 'emphasis') {
// Use custom ID instead. // Use custom ID instead.
id = toString(tail); id = toString(tail);
// Until we're on MDX 2, we need to "cut off" the comment syntax.
tail = children[children.length - 3];
if (tail && tail.type === 'text' && tail.value.endsWith('{/')) {
// Remove the emphasis and trailing `/}`
children.splice(children.length - 2, 2);
// Remove the `{/`
tail.value = tail.value.replace(/[ \t]*\{\/$/, '');
}
} }
} }

2
beta/scripts/headingIDHelpers/generateHeadingIDs.js

@ -89,7 +89,7 @@ async function main(paths) {
import('remark-parse'), import('remark-parse'),
import('remark-slug'), import('remark-slug'),
]); ]);
const unified = unifiedMod.default; const unified = unifiedMod.unified;
const remarkParse = remarkParseMod.default; const remarkParse = remarkParseMod.default;
const remarkSlug = remarkSlugMod.default; const remarkSlug = remarkSlugMod.default;
modules = {unified, remarkParse, remarkSlug}; modules = {unified, remarkParse, remarkSlug};

51
beta/src/components/MDX/CodeBlock/CodeBlock.tsx

@ -18,22 +18,27 @@ interface InlineHiglight {
} }
const CodeBlock = function CodeBlock({ const CodeBlock = function CodeBlock({
children, children: {
className = 'language-js', props: {className = 'language-js', children: code = '', meta},
metastring, },
noMargin, noMargin,
}: { }: {
children: string; children: React.ReactNode & {
props: {
className: string;
children?: string;
meta?: string;
};
};
className?: string; className?: string;
metastring: string;
noMargin?: boolean; noMargin?: boolean;
}) { }) {
const getDecoratedLineInfo = () => { const getDecoratedLineInfo = () => {
if (!metastring) { if (!meta) {
return []; return [];
} }
const linesToHighlight = getHighlightLines(metastring); const linesToHighlight = getHighlightLines(meta);
const highlightedLineConfig = linesToHighlight.map((line) => { const highlightedLineConfig = linesToHighlight.map((line) => {
return { return {
className: 'bg-github-highlight dark:bg-opacity-10', className: 'bg-github-highlight dark:bg-opacity-10',
@ -41,7 +46,7 @@ const CodeBlock = function CodeBlock({
}; };
}); });
const inlineHighlightLines = getInlineHighlights(metastring, children); const inlineHighlightLines = getInlineHighlights(meta, code);
const inlineHighlightConfig = inlineHighlightLines.map( const inlineHighlightConfig = inlineHighlightLines.map(
(line: InlineHiglight) => ({ (line: InlineHiglight) => ({
...line, ...line,
@ -74,7 +79,7 @@ const CodeBlock = function CodeBlock({
key={ key={
// HACK: There seems to be a bug where the rendered result // HACK: There seems to be a bug where the rendered result
// "lags behind" the edits to it. For now, force it to reset. // "lags behind" the edits to it. For now, force it to reset.
process.env.NODE_ENV === 'development' ? children : '' process.env.NODE_ENV === 'development' ? code : ''
} }
className={cn( className={cn(
'sandpack sandpack--codeblock', 'sandpack sandpack--codeblock',
@ -84,7 +89,7 @@ const CodeBlock = function CodeBlock({
<SandpackProvider <SandpackProvider
files={{ files={{
[filename]: { [filename]: {
code: children.trimEnd(), code: code.trimEnd(),
}, },
}} }}
customSetup={{ customSetup={{
@ -95,7 +100,7 @@ const CodeBlock = function CodeBlock({
}} }}
theme={CustomTheme}> theme={CustomTheme}>
<SandpackCodeViewer <SandpackCodeViewer
key={children.trimEnd()} key={code.trimEnd()}
showLineNumbers={false} showLineNumbers={false}
decorators={decorators} decorators={decorators}
/> />
@ -108,44 +113,44 @@ export default CodeBlock;
/** /**
* *
* @param metastring string provided after the language in a markdown block * @param meta string provided after the language in a markdown block
* @returns array of lines to highlight * @returns array of lines to highlight
* @example * @example
* ```js {1-3,7} [[1, 1, 20, 33], [2, 4, 4, 8]] App.js active * ```js {1-3,7} [[1, 1, 20, 33], [2, 4, 4, 8]] App.js active
* ... * ...
* ``` * ```
* *
* -> The metastring is `{1-3,7} [[1, 1, 20, 33], [2, 4, 4, 8]] App.js active` * -> The meta is `{1-3,7} [[1, 1, 20, 33], [2, 4, 4, 8]] App.js active`
*/ */
function getHighlightLines(metastring: string): number[] { function getHighlightLines(meta: string): number[] {
const HIGHLIGHT_REGEX = /{([\d,-]+)}/; const HIGHLIGHT_REGEX = /{([\d,-]+)}/;
const parsedMetastring = HIGHLIGHT_REGEX.exec(metastring); const parsedMeta = HIGHLIGHT_REGEX.exec(meta);
if (!parsedMetastring) { if (!parsedMeta) {
return []; return [];
} }
return rangeParser(parsedMetastring[1]); return rangeParser(parsedMeta[1]);
} }
/** /**
* *
* @param metastring string provided after the language in a markdown block * @param meta string provided after the language in a markdown block
* @returns InlineHighlight[] * @returns InlineHighlight[]
* @example * @example
* ```js {1-3,7} [[1, 1, 'count'], [2, 4, 'setCount']] App.js active * ```js {1-3,7} [[1, 1, 'count'], [2, 4, 'setCount']] App.js active
* ... * ...
* ``` * ```
* *
* -> The metastring is `{1-3,7} [[1, 1, 'count', [2, 4, 'setCount']] App.js active` * -> The meta is `{1-3,7} [[1, 1, 'count', [2, 4, 'setCount']] App.js active`
*/ */
function getInlineHighlights(metastring: string, code: string) { function getInlineHighlights(meta: string, code: string) {
const INLINE_HIGHT_REGEX = /(\[\[.*\]\])/; const INLINE_HIGHT_REGEX = /(\[\[.*\]\])/;
const parsedMetastring = INLINE_HIGHT_REGEX.exec(metastring); const parsedMeta = INLINE_HIGHT_REGEX.exec(meta);
if (!parsedMetastring) { if (!parsedMeta) {
return []; return [];
} }
const lines = code.split('\n'); const lines = code.split('\n');
const encodedHiglights = JSON.parse(parsedMetastring[1]); const encodedHiglights = JSON.parse(parsedMeta[1]);
return encodedHiglights.map(([step, lineNo, substr, fromIndex]: any[]) => { return encodedHiglights.map(([step, lineNo, substr, fromIndex]: any[]) => {
const line = lines[lineNo - 1]; const line = lines[lineNo - 1];
let index = line.indexOf(substr); let index = line.indexOf(substr);

12
beta/src/components/MDX/CodeBlock/index.tsx

@ -1,15 +1,21 @@
/* /*
* Copyright (c) Facebook, Inc. and its affiliates. * Copyright (c) Facebook, Inc. and its affiliates.
*/ */
import * as React from 'react';
import cn from 'classnames'; import cn from 'classnames';
import {lazy, memo, Suspense} from 'react'; import {lazy, memo, Suspense} from 'react';
const CodeBlock = lazy(() => import('./CodeBlock')); const CodeBlock = lazy(() => import('./CodeBlock'));
export default memo(function CodeBlockWrapper(props: { export default memo(function CodeBlockWrapper(props: {
children: React.ReactNode & {
props: {
className: string;
children: string;
meta?: string;
};
};
isFromPackageImport: boolean; isFromPackageImport: boolean;
children: string;
className?: string;
metastring: string;
noMargin?: boolean; noMargin?: boolean;
noMarkers?: boolean; noMarkers?: boolean;
}): any { }): any {

8
beta/src/components/MDX/CodeDiagram.tsx

@ -17,13 +17,7 @@ export function CodeDiagram({children, flip = false}: CodeDiagramProps) {
}); });
const content = Children.toArray(children).map((child: any) => { const content = Children.toArray(children).map((child: any) => {
if (child.type?.mdxName === 'pre') { if (child.type?.mdxName === 'pre') {
return ( return <CodeBlock {...child.props} noMargin={true} noMarkers={true} />;
<CodeBlock
{...child.props.children.props}
noMargin={true}
noMarkers={true}
/>
);
} else if (child.type === 'img') { } else if (child.type === 'img') {
return null; return null;
} else { } else {

6
beta/src/components/MDX/MDXComponents.tsx

@ -350,12 +350,10 @@ export const MDXComponents = {
h2: H2, h2: H2,
h3: H3, h3: H3,
h4: H4, h4: H4,
inlineCode: InlineCode,
hr: Divider, hr: Divider,
a: LinkWithTodo, a: LinkWithTodo,
code: CodeBlock, code: InlineCode,
// The code block renders <pre> so we just want a div here. pre: CodeBlock,
pre: (p: JSX.IntrinsicElements['div']) => <div {...p} />,
CodeDiagram, CodeDiagram,
ConsoleBlock, ConsoleBlock,
Convention, Convention,

2
beta/src/components/MDX/PackageImport.tsx

@ -18,7 +18,7 @@ export function PackageImport({children}: PackageImportProps) {
if (child.type?.mdxName === 'pre') { if (child.type?.mdxName === 'pre') {
return ( return (
<CodeBlock <CodeBlock
{...child.props.children.props} {...child.props}
isFromPackageImport isFromPackageImport
key={i} key={i}
noMargin={true} noMargin={true}

6
beta/src/components/MDX/Sandpack/createFileMap.ts

@ -15,8 +15,8 @@ export const createFileMap = (codeSnippets: any) => {
let fileHidden = false; // if the file is available as a tab let fileHidden = false; // if the file is available as a tab
let fileActive = false; // if the file tab is shown by default let fileActive = false; // if the file tab is shown by default
if (props.metastring) { if (props.meta) {
const [name, ...params] = props.metastring.split(' '); const [name, ...params] = props.meta.split(' ');
filePath = '/' + name; filePath = '/' + name;
if (params.includes('hidden')) { if (params.includes('hidden')) {
fileHidden = true; fileHidden = true;
@ -41,7 +41,7 @@ export const createFileMap = (codeSnippets: any) => {
); );
} }
result[filePath] = { result[filePath] = {
code: props.children as string, code: (props.children || '') as string,
hidden: fileHidden, hidden: fileHidden,
active: fileActive, active: fileActive,
}; };

2
beta/src/content/apis/react/useContext.md

@ -35,7 +35,7 @@ function Button() {
To pass context to a `Button`, wrap it or one of its parent components into the corresponding context provider: To pass context to a `Button`, wrap it or one of its parent components into the corresponding context provider:
```js [[1, 3, "ThemeContext"], [2, 3, "\"dark\""], [1, 5, "ThemeContext"]] ```js [[1, 3, "ThemeContext"], [2, 3, "\\"dark\\""], [1, 5, "ThemeContext"]]
function MyPage() { function MyPage() {
return ( return (
<ThemeContext.Provider value="dark"> <ThemeContext.Provider value="dark">

10
beta/src/content/blog/2014/02/16/react-v0.9-rc1.md

@ -8,13 +8,13 @@ We're almost ready to release React v0.9! We're posting a release candidate so t
The release candidate is available for download from the CDN: The release candidate is available for download from the CDN:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.9.0-rc1.js> Dev build with warnings: https://fb.me/react-0.9.0-rc1.js
Minified build for production: <https://fb.me/react-0.9.0-rc1.min.js> Minified build for production: https://fb.me/react-0.9.0-rc1.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.9.0-rc1.js> Dev build with warnings: https://fb.me/react-with-addons-0.9.0-rc1.js>
Minified build for production: <https://fb.me/react-with-addons-0.9.0-rc1.min.js> Minified build for production: https://fb.me/react-with-addons-0.9.0-rc1.min.js
- **In-Browser JSX transformer** - **In-Browser JSX transformer**
<https://fb.me/JSXTransformer-0.9.0-rc1.js> https://fb.me/JSXTransformer-0.9.0-rc1.js
We've also published version `0.9.0-rc1` of the `react` and `react-tools` packages on npm and the `react` package on bower. We've also published version `0.9.0-rc1` of the `react` and `react-tools` packages on npm and the `react` package on bower.

10
beta/src/content/blog/2014/02/20/react-v0.9.md

@ -10,13 +10,13 @@ Thanks to everyone who tested the release candidate; we were able to find and fi
As always, the release is available for download from the CDN: As always, the release is available for download from the CDN:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.9.0.js> Dev build with warnings: https://fb.me/react-0.9.0.js
Minified build for production: <https://fb.me/react-0.9.0.min.js> Minified build for production: https://fb.me/react-0.9.0.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.9.0.js> Dev build with warnings: https://fb.me/react-with-addons-0.9.0.js
Minified build for production: <https://fb.me/react-with-addons-0.9.0.min.js> Minified build for production: https://fb.me/react-with-addons-0.9.0.min.js
- **In-Browser JSX Transformer** - **In-Browser JSX Transformer**
<https://fb.me/JSXTransformer-0.9.0.js> https://fb.me/JSXTransformer-0.9.0.js
We've also published version `0.9.0` of the `react` and `react-tools` packages on npm and the `react` package on bower. We've also published version `0.9.0` of the `react` and `react-tools` packages on npm and the `react` package on bower.

10
beta/src/content/blog/2014/03/19/react-v0.10-rc1.md

@ -8,13 +8,13 @@ author: [zpao]
The release candidate is available for download from the CDN: The release candidate is available for download from the CDN:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.10.0-rc1.js> Dev build with warnings: https://fb.me/react-0.10.0-rc1.js
Minified build for production: <https://fb.me/react-0.10.0-rc1.min.js> Minified build for production: https://fb.me/react-0.10.0-rc1.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.10.0-rc1.js> Dev build with warnings: https://fb.me/react-with-addons-0.10.0-rc1.js
Minified build for production: <https://fb.me/react-with-addons-0.10.0-rc1.min.js> Minified build for production: https://fb.me/react-with-addons-0.10.0-rc1.min.js
- **In-Browser JSX transformer** - **In-Browser JSX transformer**
<https://fb.me/JSXTransformer-0.10.0-rc1.js> https://fb.me/JSXTransformer-0.10.0-rc1.js
We've also published version `0.10.0-rc1` of the `react` and `react-tools` packages on npm and the `react` package on bower. We've also published version `0.10.0-rc1` of the `react` and `react-tools` packages on npm and the `react` package on bower.

10
beta/src/content/blog/2014/03/21/react-v0.10.md

@ -8,13 +8,13 @@ Hot on the heels of the [release candidate earlier this week](/blog/2014/03/19/r
The release is available for download from the CDN: The release is available for download from the CDN:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.10.0.js> Dev build with warnings: https://fb.me/react-0.10.0.js
Minified build for production: <https://fb.me/react-0.10.0.min.js> Minified build for production: https://fb.me/react-0.10.0.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.10.0.js> Dev build with warnings: https://fb.me/react-with-addons-0.10.0.js
Minified build for production: <https://fb.me/react-with-addons-0.10.0.min.js> Minified build for production: https://fb.me/react-with-addons-0.10.0.min.js
- **In-Browser JSX transformer** - **In-Browser JSX transformer**
<https://fb.me/JSXTransformer-0.10.0.js> https://fb.me/JSXTransformer-0.10.0.js
We've also published version `0.10.0` of the `react` and `react-tools` packages on npm and the `react` package on bower. We've also published version `0.10.0` of the `react` and `react-tools` packages on npm and the `react` package on bower.

10
beta/src/content/blog/2014/07/13/react-v0.11-rc1.md

@ -8,13 +8,13 @@ It's that time again… we're just about ready to ship a new React release! v0.1
The release candidate is available for download from the CDN: The release candidate is available for download from the CDN:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.11.0-rc1.js> Dev build with warnings: https://fb.me/react-0.11.0-rc1.js
Minified build for production: <https://fb.me/react-0.11.0-rc1.min.js> Minified build for production: https://fb.me/react-0.11.0-rc1.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.11.0-rc1.js> Dev build with warnings: https://fb.me/react-with-addons-0.11.0-rc1.js
Minified build for production: <https://fb.me/react-with-addons-0.11.0-rc1.min.js> Minified build for production: https://fb.me/react-with-addons-0.11.0-rc1.min.js
- **In-Browser JSX transformer** - **In-Browser JSX transformer**
<https://fb.me/JSXTransformer-0.11.0-rc1.js> https://fb.me/JSXTransformer-0.11.0-rc1.js
We've also published version `0.11.0-rc1` of the `react` and `react-tools` packages on npm and the `react` package on bower. We've also published version `0.11.0-rc1` of the `react` and `react-tools` packages on npm and the `react` package on bower.

10
beta/src/content/blog/2014/07/17/react-v0.11.md

@ -14,13 +14,13 @@ This version has been cooking for a couple months now and includes a wide array
The release is available for download from the CDN: The release is available for download from the CDN:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.11.0.js> Dev build with warnings: https://fb.me/react-0.11.0.js
Minified build for production: <https://fb.me/react-0.11.0.min.js> Minified build for production: https://fb.me/react-0.11.0.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.11.0.js> Dev build with warnings: https://fb.me/react-with-addons-0.11.0.js
Minified build for production: <https://fb.me/react-with-addons-0.11.0.min.js> Minified build for production: https://fb.me/react-with-addons-0.11.0.min.js
- **In-Browser JSX transformer** - **In-Browser JSX transformer**
<https://fb.me/JSXTransformer-0.11.0.js> https://fb.me/JSXTransformer-0.11.0.js
We've also published version `0.11.0` of the `react` and `react-tools` packages on npm and the `react` package on bower. We've also published version `0.11.0` of the `react` and `react-tools` packages on npm and the `react` package on bower.

10
beta/src/content/blog/2014/07/25/react-v0.11.1.md

@ -16,13 +16,13 @@ We'd also like to call out a couple additional breaking changes that we failed t
The release is available for download from the CDN: The release is available for download from the CDN:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.11.1.js> Dev build with warnings: https://fb.me/react-0.11.1.js
Minified build for production: <https://fb.me/react-0.11.1.min.js> Minified build for production: https://fb.me/react-0.11.1.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.11.1.js> Dev build with warnings: https://fb.me/react-with-addons-0.11.1.js
Minified build for production: <https://fb.me/react-with-addons-0.11.1.min.js> Minified build for production: https://fb.me/react-with-addons-0.11.1.min.js
- **In-Browser JSX transformer** - **In-Browser JSX transformer**
<https://fb.me/JSXTransformer-0.11.1.js> https://fb.me/JSXTransformer-0.11.1.js
We've also published version `0.11.1` of the `react` and `react-tools` packages on npm and the `react` package on bower. We've also published version `0.11.1` of the `react` and `react-tools` packages on npm and the `react` package on bower.

4
beta/src/content/blog/2014/08/03/community-roundup-21.md

@ -27,10 +27,6 @@ Areeb Malik, from Facebook, talks about his experience using React. "On paper, a
[![](/images/blog/skills-matter.png)](https://skillsmatter.com/skillscasts/5429-going-big-with-react) [![](/images/blog/skills-matter.png)](https://skillsmatter.com/skillscasts/5429-going-big-with-react)
<!--
<iframe allowfullscreen="" data-progress="true" frameborder="0" height="390" id="vimeo-player" mozallowfullscreen="" src="//player.vimeo.com/video/100245392?api=1&amp;title=0" webkitallowfullscreen="" width="640"></iframe>
-->
## What is React? {/*what-is-react*/} ## What is React? {/*what-is-react*/}
[Craig McKeachie](http://www.funnyant.com/author/admin/) author of [JavaScript Framework Guide](http://www.funnyant.com/javascript-framework-guide/) wrote an excellent news named ["What is React.js? Another Template Library?](http://www.funnyant.com/reactjs-what-is-it/) [Craig McKeachie](http://www.funnyant.com/author/admin/) author of [JavaScript Framework Guide](http://www.funnyant.com/javascript-framework-guide/) wrote an excellent news named ["What is React.js? Another Template Library?](http://www.funnyant.com/reactjs-what-is-it/)

2
beta/src/content/blog/2014/09/03/introducing-the-jsx-specification.md

@ -7,7 +7,7 @@ At Facebook we've been using JSX for a long time. We originally introduced it to
In order to make it easier to implement new versions and to make sure that the syntax remains compatible, we're now formalizing the syntax of JSX in a stand-alone spec without any semantic meaning. It's completely stand-alone from React itself. In order to make it easier to implement new versions and to make sure that the syntax remains compatible, we're now formalizing the syntax of JSX in a stand-alone spec without any semantic meaning. It's completely stand-alone from React itself.
Read the spec now at <https://facebook.github.io/jsx/>. Read the spec now at https://facebook.github.io/jsx/.
This is not a proposal to be standardized in ECMAScript. It's just a reference document that transpiler writers and syntax highlighters can agree on. It's currently in a draft stage and will probably continue to be a living document. This is not a proposal to be standardized in ECMAScript. It's just a reference document that transpiler writers and syntax highlighters can agree on. It's currently in a draft stage and will probably continue to be a living document.

10
beta/src/content/blog/2014/09/16/react-v0.11.2.md

@ -14,13 +14,13 @@ And lastly, on the heels of announcing Flow at [@Scale](http://atscaleconference
The release is available for download from the CDN: The release is available for download from the CDN:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.11.2.js> Dev build with warnings: https://fb.me/react-0.11.2.js
Minified build for production: <https://fb.me/react-0.11.2.min.js> Minified build for production: https://fb.me/react-0.11.2.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.11.2.js> Dev build with warnings: https://fb.me/react-with-addons-0.11.2.js
Minified build for production: <https://fb.me/react-with-addons-0.11.2.min.js> Minified build for production: https://fb.me/react-with-addons-0.11.2.min.js
- **In-Browser JSX transformer** - **In-Browser JSX transformer**
<https://fb.me/JSXTransformer-0.11.2.js> https://fb.me/JSXTransformer-0.11.2.js
We've also published version `0.11.2` of the `react` and `react-tools` packages on npm and the `react` package on bower. We've also published version `0.11.2` of the `react` and `react-tools` packages on npm and the `react` package on bower.

10
beta/src/content/blog/2014/10/16/react-v0.12-rc1.md

@ -8,13 +8,13 @@ We are finally ready to share the work we've been doing over the past couple mon
The release candidate is available for download: The release candidate is available for download:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.12.0-rc1.js> Dev build with warnings: https://fb.me/react-0.12.0-rc1.js
Minified build for production: <https://fb.me/react-0.12.0-rc1.min.js> Minified build for production: https://fb.me/react-0.12.0-rc1.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.12.0-rc1.js> Dev build with warnings: https://fb.me/react-with-addons-0.12.0-rc1.js
Minified build for production: <https://fb.me/react-with-addons-0.12.0-rc1.min.js> Minified build for production: https://fb.me/react-with-addons-0.12.0-rc1.min.js
- **In-Browser JSX transformer** - **In-Browser JSX transformer**
<https://fb.me/JSXTransformer-0.12.0-rc1.js> https://fb.me/JSXTransformer-0.12.0-rc1.js
We've also published version `0.12.0-rc1` of the `react` and `react-tools` packages on npm and the `react` package on bower. We've also published version `0.12.0-rc1` of the `react` and `react-tools` packages on npm and the `react` package on bower.

12
beta/src/content/blog/2014/10/28/react-v0.12.md

@ -10,13 +10,13 @@ We have talked a lot about some of the bigger changes in this release. [We intro
The release is available for download: The release is available for download:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.12.0.js> Dev build with warnings: https://fb.me/react-0.12.0.js
Minified build for production: <https://fb.me/react-0.12.0.min.js> Minified build for production: https://fb.me/react-0.12.0.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.12.0.js> Dev build with warnings: https://fb.me/react-with-addons-0.12.0.js
Minified build for production: <https://fb.me/react-with-addons-0.12.0.min.js> Minified build for production: https://fb.me/react-with-addons-0.12.0.min.js
- **In-Browser JSX transformer** - **In-Browser JSX transformer**
<https://fb.me/JSXTransformer-0.12.0.js> https://fb.me/JSXTransformer-0.12.0.js
We've also published version `0.12.0` of the `react` and `react-tools` packages on npm and the `react` package on bower. We've also published version `0.12.0` of the `react` and `react-tools` packages on npm and the `react` package on bower.
@ -37,7 +37,7 @@ The old methods will still work but will warn upon first use. They will be remov
- DOM components don't make use of `React.DOM`, instead we pass the tag name directly. `<div/>` becomes `React.createElement('div')` - DOM components don't make use of `React.DOM`, instead we pass the tag name directly. `<div/>` becomes `React.createElement('div')`
- We introduced spread attributes as a quick way to transfer props. - We introduced spread attributes as a quick way to transfer props.
## DevTools Improvements, No More `__internals` {#devtools-improvements-no-more-\_\_internals} {/*devtools-improvements-no-more-__internals-devtools-improvements-no-more-__internals*/} ## DevTools Improvements, No More `__internals` {/*devtools-improvements-no-more-__internals*/}
For months we've gotten complaints about the React DevTools message. It shouldn't have logged the up-sell message when you were already using the DevTools. Unfortunately this was because the way we implemented these tools resulted in the DevTools knowing about React, but not the reverse. We finally gave this some attention and enabled React to know if the DevTools are installed. We released an update to the devtools several weeks ago making this possible. Extensions in Chrome should auto-update so you probably already have the update installed! For months we've gotten complaints about the React DevTools message. It shouldn't have logged the up-sell message when you were already using the DevTools. Unfortunately this was because the way we implemented these tools resulted in the DevTools knowing about React, but not the reverse. We finally gave this some attention and enabled React to know if the DevTools are installed. We released an update to the devtools several weeks ago making this possible. Extensions in Chrome should auto-update so you probably already have the update installed!

10
beta/src/content/blog/2014/12/18/react-v0.12.2.md

@ -10,13 +10,13 @@ You may have noticed that we did not do an announcement for v0.12.1. That releas
The release is available for download from the CDN: The release is available for download from the CDN:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.12.2.js> Dev build with warnings: https://fb.me/react-0.12.2.js
Minified build for production: <https://fb.me/react-0.12.2.min.js> Minified build for production: https://fb.me/react-0.12.2.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.12.2.js> Dev build with warnings: https://fb.me/react-with-addons-0.12.2.js
Minified build for production: <https://fb.me/react-with-addons-0.12.2.min.js> Minified build for production: https://fb.me/react-with-addons-0.12.2.min.js
- **In-Browser JSX transformer** - **In-Browser JSX transformer**
<https://fb.me/JSXTransformer-0.12.2.js> https://fb.me/JSXTransformer-0.12.2.js
We've also published version `0.12.2` of the `react` and `react-tools` packages on npm and the `react` package on bower. `0.12.1` is also available in the same locations if need those. We've also published version `0.12.2` of the `react` and `react-tools` packages on npm and the `react` package on bower. `0.12.1` is also available in the same locations if need those.

2
beta/src/content/blog/2014/12/19/react-js-conf-diversity-scholarship.md

@ -16,7 +16,7 @@ Beginning today, those studying or working in computer science or a related fiel
At Facebook, we believe that anyone anywhere can make a positive impact by developing products to make the world more open and connected to the people and things they care about. Given the current realities of the tech industry and the lack of representation of communities we seek to serve, applicants currently under-represented in Computer Science and related fields are strongly encouraged to apply. At Facebook, we believe that anyone anywhere can make a positive impact by developing products to make the world more open and connected to the people and things they care about. Given the current realities of the tech industry and the lack of representation of communities we seek to serve, applicants currently under-represented in Computer Science and related fields are strongly encouraged to apply.
Facebook will make determinations on scholarship recipients in its sole discretion. Facebook complies with all equal opportunity laws. Facebook will make determinations on scholarship recipients in its sole discretion. Facebook complies with all equal opportunity laws.
To apply for the scholarship, please visit the Application Page: <https://www.surveymonkey.com/s/XVJGK6R> To apply for the scholarship, please visit the Application Page: https://www.surveymonkey.com/s/XVJGK6R
## Award Includes {/*award-includes*/} ## Award Includes {/*award-includes*/}

10
beta/src/content/blog/2015/02/24/react-v0.13-rc1.md

@ -11,13 +11,13 @@ We've talked a little bit about the changes that are coming. The splashiest of t
The release candidate is available for download: The release candidate is available for download:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.13.0-rc1.js> Dev build with warnings: https://fb.me/react-0.13.0-rc1.js
Minified build for production: <https://fb.me/react-0.13.0-rc1.min.js> Minified build for production: https://fb.me/react-0.13.0-rc1.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.13.0-rc1.js> Dev build with warnings: https://fb.me/react-with-addons-0.13.0-rc1.js
Minified build for production: <https://fb.me/react-with-addons-0.13.0-rc1.min.js> Minified build for production: https://fb.me/react-with-addons-0.13.0-rc1.min.js
- **In-Browser JSX transformer** - **In-Browser JSX transformer**
<https://fb.me/JSXTransformer-0.13.0-rc1.js> https://fb.me/JSXTransformer-0.13.0-rc1.js
We've also published version `0.13.0-rc1` of the `react` and `react-tools` packages on npm and the `react` package on bower. We've also published version `0.13.0-rc1` of the `react` and `react-tools` packages on npm and the `react` package on bower.

2
beta/src/content/blog/2015/02/24/streamlining-react-elements.md

@ -194,7 +194,7 @@ Since these objects can have any keys with almost any value, we can’t differen
To differentiate ReactElements from one of these objects, we have to tag them with `_isReactElement`. This is another issue preventing us from inlining ReactElements as simple object literals. To differentiate ReactElements from one of these objects, we have to tag them with `_isReactElement`. This is another issue preventing us from inlining ReactElements as simple object literals.
### Solution: Just use an Array and key={…} {/*solution-just-use-an-array-and-key*/} ### Solution: Just use an Array and `key={...}` {/*solution-just-use-an-array-and-key*/}
Most of the time you can just use an array with keyed ReactElements. Most of the time you can just use an array with keyed ReactElements.

10
beta/src/content/blog/2015/03/03/react-v0.13-rc2.md

@ -13,13 +13,13 @@ Thanks to everybody who has already been testing the release candidate. We've re
The release candidate is available for download: The release candidate is available for download:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.13.0-rc2.js> Dev build with warnings: https://fb.me/react-0.13.0-rc2.js
Minified build for production: <https://fb.me/react-0.13.0-rc2.min.js> Minified build for production: https://fb.me/react-0.13.0-rc2.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.13.0-rc2.js> Dev build with warnings: https://fb.me/react-with-addons-0.13.0-rc2.js
Minified build for production: <https://fb.me/react-with-addons-0.13.0-rc2.min.js> Minified build for production: https://fb.me/react-with-addons-0.13.0-rc2.min.js
- **In-Browser JSX transformer** - **In-Browser JSX transformer**
<https://fb.me/JSXTransformer-0.13.0-rc2.js> https://fb.me/JSXTransformer-0.13.0-rc2.js
We've also published version `0.13.0-rc2` of the `react` and `react-tools` packages on npm and the `react` package on bower. We've also published version `0.13.0-rc2` of the `react` and `react-tools` packages on npm and the `react` package on bower.

10
beta/src/content/blog/2015/03/10/react-v0.13.md

@ -17,13 +17,13 @@ Our planned optimizations require that ReactElement objects are immutable, which
The release is now available for download: The release is now available for download:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.13.0.js> Dev build with warnings: https://fb.me/react-0.13.0.js
Minified build for production: <https://fb.me/react-0.13.0.min.js> Minified build for production: https://fb.me/react-0.13.0.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.13.0.js> Dev build with warnings: https://fb.me/react-with-addons-0.13.0.js
Minified build for production: <https://fb.me/react-with-addons-0.13.0.min.js> Minified build for production: https://fb.me/react-with-addons-0.13.0.min.js
- **In-Browser JSX transformer** - **In-Browser JSX transformer**
<https://fb.me/JSXTransformer-0.13.0.js> https://fb.me/JSXTransformer-0.13.0.js
We've also published version `0.13.0` of the `react` and `react-tools` packages on npm and the `react` package on bower. We've also published version `0.13.0` of the `react` and `react-tools` packages on npm and the `react` package on bower.

10
beta/src/content/blog/2015/03/16/react-v0.13.1.md

@ -10,13 +10,13 @@ Thanks all of you who have been upgrading your applications and taking the time
The release is now available for download: The release is now available for download:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.13.1.js> Dev build with warnings: https://fb.me/react-0.13.1.js
Minified build for production: <https://fb.me/react-0.13.1.min.js> Minified build for production: https://fb.me/react-0.13.1.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.13.1.js> Dev build with warnings: https://fb.me/react-with-addons-0.13.1.js
Minified build for production: <https://fb.me/react-with-addons-0.13.1.min.js> Minified build for production: https://fb.me/react-with-addons-0.13.1.min.js
- **In-Browser JSX transformer** - **In-Browser JSX transformer**
<https://fb.me/JSXTransformer-0.13.1.js> https://fb.me/JSXTransformer-0.13.1.js
We've also published version `0.13.1` of the `react` and `react-tools` packages on npm and the `react` package on bower. We've also published version `0.13.1` of the `react` and `react-tools` packages on npm and the `react` package on bower.

10
beta/src/content/blog/2015/04/18/react-v0.13.2.md

@ -8,13 +8,13 @@ Yesterday the [React Native team shipped v0.4](/blog/2015/04/17/react-native-v0.
The release is now available for download: The release is now available for download:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.13.2.js> Dev build with warnings: https://fb.me/react-0.13.2.js
Minified build for production: <https://fb.me/react-0.13.2.min.js> Minified build for production: https://fb.me/react-0.13.2.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.13.2.js> Dev build with warnings: https://fb.me/react-with-addons-0.13.2.js
Minified build for production: <https://fb.me/react-with-addons-0.13.2.min.js> Minified build for production: https://fb.me/react-with-addons-0.13.2.min.js
- **In-Browser JSX transformer** - **In-Browser JSX transformer**
<https://fb.me/JSXTransformer-0.13.2.js> https://fb.me/JSXTransformer-0.13.2.js
We've also published version `0.13.2` of the `react` and `react-tools` packages on npm and the `react` package on bower. We've also published version `0.13.2` of the `react` and `react-tools` packages on npm and the `react` package on bower.

10
beta/src/content/blog/2015/05/08/react-v0.13.3.md

@ -8,13 +8,13 @@ Today we're sharing another patch release in the v0.13 branch. There are only a
The release is now available for download: The release is now available for download:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.13.3.js> Dev build with warnings: https://fb.me/react-0.13.3.js
Minified build for production: <https://fb.me/react-0.13.3.min.js> Minified build for production: https://fb.me/react-0.13.3.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.13.3.js> Dev build with warnings: https://fb.me/react-with-addons-0.13.3.js
Minified build for production: <https://fb.me/react-with-addons-0.13.3.min.js> Minified build for production: https://fb.me/react-with-addons-0.13.3.min.js
- **In-Browser JSX transformer** - **In-Browser JSX transformer**
<https://fb.me/JSXTransformer-0.13.3.js> https://fb.me/JSXTransformer-0.13.3.js
We've also published version `0.13.3` of the `react` and `react-tools` packages on npm and the `react` package on bower. We've also published version `0.13.3` of the `react` and `react-tools` packages on npm and the `react` package on bower.

12
beta/src/content/blog/2015/09/10/react-v0.14-rc1.md

@ -19,14 +19,14 @@ Remember that by default, React runs extra checks and provides helpful warnings
If you can’t use `npm` yet, we also provide pre-built browser builds for your convenience: If you can’t use `npm` yet, we also provide pre-built browser builds for your convenience:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.14.0-rc1.js> Dev build with warnings: https://fb.me/react-0.14.0-rc1.js
Minified build for production: <https://fb.me/react-0.14.0-rc1.min.js> Minified build for production: https://fb.me/react-0.14.0-rc1.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.14.0-rc1.js> Dev build with warnings: https://fb.me/react-with-addons-0.14.0-rc1.js
Minified build for production: <https://fb.me/react-with-addons-0.14.0-rc1.min.js> Minified build for production: https://fb.me/react-with-addons-0.14.0-rc1.min.js
- **React DOM** (include React in the page before React DOM) - **React DOM** (include React in the page before React DOM)
Dev build with warnings: <https://fb.me/react-dom-0.14.0-rc1.js> Dev build with warnings: https://fb.me/react-dom-0.14.0-rc1.js
Minified build for production: <https://fb.me/react-dom-0.14.0-rc1.min.js> Minified build for production: https://fb.me/react-dom-0.14.0-rc1.min.js
These builds are also available in the `react` package on bower. These builds are also available in the `react` package on bower.

12
beta/src/content/blog/2015/10/07/react-v0.14.md

@ -30,14 +30,14 @@ Remember that by default, React runs extra checks and provides helpful warnings
If you can’t use `npm` yet, we provide pre-built browser builds for your convenience, which are also available in the `react` package on bower. If you can’t use `npm` yet, we provide pre-built browser builds for your convenience, which are also available in the `react` package on bower.
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.14.0.js> Dev build with warnings: https://fb.me/react-0.14.0.js
Minified build for production: <https://fb.me/react-0.14.0.min.js> Minified build for production: https://fb.me/react-0.14.0.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.14.0.js> Dev build with warnings: https://fb.me/react-with-addons-0.14.0.js
Minified build for production: <https://fb.me/react-with-addons-0.14.0.min.js> Minified build for production: https://fb.me/react-with-addons-0.14.0.min.js
- **React DOM** (include React in the page before React DOM) - **React DOM** (include React in the page before React DOM)
Dev build with warnings: <https://fb.me/react-dom-0.14.0.js> Dev build with warnings: https://fb.me/react-dom-0.14.0.js
Minified build for production: <https://fb.me/react-dom-0.14.0.min.js> Minified build for production: https://fb.me/react-dom-0.14.0.min.js
## Changelog {/*changelog*/} ## Changelog {/*changelog*/}

12
beta/src/content/blog/2015/10/28/react-v0.14.1.md

@ -8,14 +8,14 @@ After a couple weeks of having more people use v0.14, we're ready to ship a patc
The release is now available for download: The release is now available for download:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.14.1.js> Dev build with warnings: https://fb.me/react-0.14.1.js
Minified build for production: <https://fb.me/react-0.14.1.min.js> Minified build for production: https://fb.me/react-0.14.1.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.14.1.js> Dev build with warnings: https://fb.me/react-with-addons-0.14.1.js
Minified build for production: <https://fb.me/react-with-addons-0.14.1.min.js> Minified build for production: https://fb.me/react-with-addons-0.14.1.min.js
- **React DOM** (include React in the page before React DOM) - **React DOM** (include React in the page before React DOM)
Dev build with warnings: <https://fb.me/react-dom-0.14.1.js> Dev build with warnings: https://fb.me/react-dom-0.14.1.js
Minified build for production: <https://fb.me/react-dom-0.14.1.min.js> Minified build for production: https://fb.me/react-dom-0.14.1.min.js
We've also published version `0.14.1` of the `react`, `react-dom`, and addons packages on npm and the `react` package on bower. We've also published version `0.14.1` of the `react`, `react-dom`, and addons packages on npm and the `react` package on bower.

12
beta/src/content/blog/2015/11/02/react-v0.14.2.md

@ -8,14 +8,14 @@ We have a quick update following the release of 0.14.1 last week. It turns out w
The release is now available for download: The release is now available for download:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.14.2.js> Dev build with warnings: https://fb.me/react-0.14.2.js
Minified build for production: <https://fb.me/react-0.14.2.min.js> Minified build for production: https://fb.me/react-0.14.2.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.14.2.js> Dev build with warnings: https://fb.me/react-with-addons-0.14.2.js
Minified build for production: <https://fb.me/react-with-addons-0.14.2.min.js> Minified build for production: https://fb.me/react-with-addons-0.14.2.min.js
- **React DOM** (include React in the page before React DOM) - **React DOM** (include React in the page before React DOM)
Dev build with warnings: <https://fb.me/react-dom-0.14.2.js> Dev build with warnings: https://fb.me/react-dom-0.14.2.js
Minified build for production: <https://fb.me/react-dom-0.14.2.min.js> Minified build for production: https://fb.me/react-dom-0.14.2.min.js
We've also published version `0.14.2` of the `react`, `react-dom`, and addons packages on npm and the `react` package on bower. We've also published version `0.14.2` of the `react`, `react-dom`, and addons packages on npm and the `react` package on bower.

16
beta/src/content/blog/2015/11/18/react-v0.14.3.md

@ -8,17 +8,17 @@ It's time for another installment of React patch releases! We didn't break anyth
The release is now available for download: The release is now available for download:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.14.3.js> Dev build with warnings: https://fb.me/react-0.14.3.js
Minified build for production: <https://fb.me/react-0.14.3.min.js> Minified build for production: https://fb.me/react-0.14.3.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.14.3.js> Dev build with warnings: https://fb.me/react-with-addons-0.14.3.js
Minified build for production: <https://fb.me/react-with-addons-0.14.3.min.js> Minified build for production: https://fb.me/react-with-addons-0.14.3.min.js
- **React DOM** (include React in the page before React DOM) - **React DOM** (include React in the page before React DOM)
Dev build with warnings: <https://fb.me/react-dom-0.14.3.js> Dev build with warnings: https://fb.me/react-dom-0.14.3.js
Minified build for production: <https://fb.me/react-dom-0.14.3.min.js> Minified build for production: https://fb.me/react-dom-0.14.3.min.js
- **React DOM Server** (include React in the page before React DOM Server) - **React DOM Server** (include React in the page before React DOM Server)
Dev build with warnings: <https://fb.me/react-dom-server-0.14.3.js> Dev build with warnings: https://fb.me/react-dom-server-0.14.3.js
Minified build for production: <https://fb.me/react-dom-server-0.14.3.min.js> Minified build for production: https://fb.me/react-dom-server-0.14.3.min.js
We've also published version `0.14.3` of the `react`, `react-dom`, and addons packages on npm and the `react` package on bower. We've also published version `0.14.3` of the `react`, `react-dom`, and addons packages on npm and the `react` package on bower.

2
beta/src/content/blog/2015/12/04/react-js-conf-2016-diversity-scholarship.md

@ -23,7 +23,7 @@ React opens a world of new possibilities such as server-side rendering, real-tim
At Facebook, we believe that anyone anywhere can make a positive impact by developing products to make the world more open and connected to the people and things they care about. Given the current realities of the tech industry and the lack of representation of communities we seek to serve, applicants currently under-represented in Computer Science and related fields are strongly encouraged to apply. Facebook will make determinations on scholarship recipients in its sole discretion. Facebook complies with all equal opportunity laws. At Facebook, we believe that anyone anywhere can make a positive impact by developing products to make the world more open and connected to the people and things they care about. Given the current realities of the tech industry and the lack of representation of communities we seek to serve, applicants currently under-represented in Computer Science and related fields are strongly encouraged to apply. Facebook will make determinations on scholarship recipients in its sole discretion. Facebook complies with all equal opportunity laws.
To apply for the scholarship, please visit the application page: **<http://goo.gl/forms/PEmKj8oUp4>** To apply for the scholarship, please visit the application page: **http://goo.gl/forms/PEmKj8oUp4**
## Award Includes {/*award-includes*/} ## Award Includes {/*award-includes*/}

16
beta/src/content/blog/2015/12/29/react-v0.14.4.md

@ -8,17 +8,17 @@ Happy December! We have a minor point release today. It has just a few small bug
The release is now available for download: The release is now available for download:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.14.4.js> Dev build with warnings: https://fb.me/react-0.14.4.js
Minified build for production: <https://fb.me/react-0.14.4.min.js> Minified build for production: https://fb.me/react-0.14.4.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.14.4.js> Dev build with warnings: https://fb.me/react-with-addons-0.14.4.js
Minified build for production: <https://fb.me/react-with-addons-0.14.4.min.js> Minified build for production: https://fb.me/react-with-addons-0.14.4.min.js
- **React DOM** (include React in the page before React DOM) - **React DOM** (include React in the page before React DOM)
Dev build with warnings: <https://fb.me/react-dom-0.14.4.js> Dev build with warnings: https://fb.me/react-dom-0.14.4.js
Minified build for production: <https://fb.me/react-dom-0.14.4.min.js> Minified build for production: https://fb.me/react-dom-0.14.4.min.js
- **React DOM Server** (include React in the page before React DOM Server) - **React DOM Server** (include React in the page before React DOM Server)
Dev build with warnings: <https://fb.me/react-dom-server-0.14.4.js> Dev build with warnings: https://fb.me/react-dom-server-0.14.4.js
Minified build for production: <https://fb.me/react-dom-server-0.14.4.min.js> Minified build for production: https://fb.me/react-dom-server-0.14.4.min.js
We've also published version `0.14.4` of the `react`, `react-dom`, and addons packages on npm and the `react` package on bower. We've also published version `0.14.4` of the `react`, `react-dom`, and addons packages on npm and the `react` package on bower.

12
beta/src/content/blog/2016/03/07/react-v15-rc1.md

@ -28,14 +28,14 @@ Remember that by default, React runs extra checks and provides helpful warnings
If you can’t use `npm` yet, we provide pre-built browser builds for your convenience, which are also available in the `react` package on bower. If you can’t use `npm` yet, we provide pre-built browser builds for your convenience, which are also available in the `react` package on bower.
- **React** - **React**
Dev build with warnings: <https://fb.me/react-15.0.0-rc.1.js> Dev build with warnings: https://fb.me/react-15.0.0-rc.1.js
Minified build for production: <https://fb.me/react-15.0.0-rc.1.min.js> Minified build for production: https://fb.me/react-15.0.0-rc.1.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-15.0.0-rc.1.js> Dev build with warnings: https://fb.me/react-with-addons-15.0.0-rc.1.js
Minified build for production: <https://fb.me/react-with-addons-15.0.0-rc.1.min.js> Minified build for production: https://fb.me/react-with-addons-15.0.0-rc.1.min.js
- **React DOM** (include React in the page before React DOM) - **React DOM** (include React in the page before React DOM)
Dev build with warnings: <https://fb.me/react-dom-15.0.0-rc.1.js> Dev build with warnings: https://fb.me/react-dom-15.0.0-rc.1.js
Minified build for production: <https://fb.me/react-dom-15.0.0-rc.1.min.js> Minified build for production: https://fb.me/react-dom-15.0.0-rc.1.min.js
## Changelog {/*changelog*/} ## Changelog {/*changelog*/}

12
beta/src/content/blog/2016/03/16/react-v15-rc2.md

@ -22,11 +22,11 @@ Remember that by default, React runs extra checks and provides helpful warnings
If you can’t use `npm` yet, we provide pre-built browser builds for your convenience, which are also available in the `react` package on bower. If you can’t use `npm` yet, we provide pre-built browser builds for your convenience, which are also available in the `react` package on bower.
- **React** - **React**
Dev build with warnings: <https://fb.me/react-15.0.0-rc.2.js> Dev build with warnings: https://fb.me/react-15.0.0-rc.2.js
Minified build for production: <https://fb.me/react-15.0.0-rc.2.min.js> Minified build for production: https://fb.me/react-15.0.0-rc.2.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-15.0.0-rc.2.js> Dev build with warnings: https://fb.me/react-with-addons-15.0.0-rc.2.js
Minified build for production: <https://fb.me/react-with-addons-15.0.0-rc.2.min.js> Minified build for production: https://fb.me/react-with-addons-15.0.0-rc.2.min.js
- **React DOM** (include React in the page before React DOM) - **React DOM** (include React in the page before React DOM)
Dev build with warnings: <https://fb.me/react-dom-15.0.0-rc.2.js> Dev build with warnings: https://fb.me/react-dom-15.0.0-rc.2.js
Minified build for production: <https://fb.me/react-dom-15.0.0-rc.2.min.js> Minified build for production: https://fb.me/react-dom-15.0.0-rc.2.min.js

16
beta/src/content/blog/2016/03/29/react-v0.14.8.md

@ -10,17 +10,17 @@ However [Ian Christian Myers](https://github.com/iancmyers) discovered a memory
The release is now available for download: The release is now available for download:
- **React** - **React**
Dev build with warnings: <https://fb.me/react-0.14.8.js> Dev build with warnings: https://fb.me/react-0.14.8.js
Minified build for production: <https://fb.me/react-0.14.8.min.js> Minified build for production: https://fb.me/react-0.14.8.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.14.8.js> Dev build with warnings: https://fb.me/react-with-addons-0.14.8.js
Minified build for production: <https://fb.me/react-with-addons-0.14.8.min.js> Minified build for production: https://fb.me/react-with-addons-0.14.8.min.js
- **React DOM** (include React in the page before React DOM) - **React DOM** (include React in the page before React DOM)
Dev build with warnings: <https://fb.me/react-dom-0.14.8.js> Dev build with warnings: https://fb.me/react-dom-0.14.8.js
Minified build for production: <https://fb.me/react-dom-0.14.8.min.js> Minified build for production: https://fb.me/react-dom-0.14.8.min.js
- **React DOM Server** (include React in the page before React DOM Server) - **React DOM Server** (include React in the page before React DOM Server)
Dev build with warnings: <https://fb.me/react-dom-server-0.14.8.js> Dev build with warnings: https://fb.me/react-dom-server-0.14.8.js
Minified build for production: <https://fb.me/react-dom-server-0.14.8.min.js> Minified build for production: https://fb.me/react-dom-server-0.14.8.min.js
We've also published version `0.14.8` of the `react`, `react-dom`, and addons packages on npm and the `react` package on bower. We've also published version `0.14.8` of the `react`, `react-dom`, and addons packages on npm and the `react` package on bower.

12
beta/src/content/blog/2016/04/07/react-v15.md

@ -38,14 +38,14 @@ Remember that by default, React runs extra checks and provides helpful warnings
If you can’t use `npm` yet, we provide pre-built browser builds for your convenience, which are also available in the `react` package on bower. If you can’t use `npm` yet, we provide pre-built browser builds for your convenience, which are also available in the `react` package on bower.
- **React** - **React**
Dev build with warnings: <https://fb.me/react-15.0.0.js> Dev build with warnings: https://fb.me/react-15.0.0.js
Minified build for production: <https://fb.me/react-15.0.0.min.js> Minified build for production: https://fb.me/react-15.0.0.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-15.0.0.js> Dev build with warnings: https://fb.me/react-with-addons-15.0.0.js
Minified build for production: <https://fb.me/react-with-addons-15.0.0.min.js> Minified build for production: https://fb.me/react-with-addons-15.0.0.min.js
- **React DOM** (include React in the page before React DOM) - **React DOM** (include React in the page before React DOM)
Dev build with warnings: <https://fb.me/react-dom-15.0.0.js> Dev build with warnings: https://fb.me/react-dom-15.0.0.js
Minified build for production: <https://fb.me/react-dom-15.0.0.min.js> Minified build for production: https://fb.me/react-dom-15.0.0.min.js
## Changelog {/*changelog*/} ## Changelog {/*changelog*/}

12
beta/src/content/blog/2016/04/08/react-v15.0.1.md

@ -14,14 +14,14 @@ We apologize if you installed 15.0.0 and have encountered these issues yourselve
As usual, you can get install the `react` package via npm or download a browser bundle. As usual, you can get install the `react` package via npm or download a browser bundle.
- **React** - **React**
Dev build with warnings: <https://fb.me/react-15.0.1.js> Dev build with warnings: https://fb.me/react-15.0.1.js
Minified build for production: <https://fb.me/react-15.0.1.min.js> Minified build for production: https://fb.me/react-15.0.1.min.js
- **React with Add-Ons** - **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-15.0.1.js> Dev build with warnings: https://fb.me/react-with-addons-15.0.1.js
Minified build for production: <https://fb.me/react-with-addons-15.0.1.min.js> Minified build for production: https://fb.me/react-with-addons-15.0.1.min.js
- **React DOM** (include React in the page before React DOM) - **React DOM** (include React in the page before React DOM)
Dev build with warnings: <https://fb.me/react-dom-15.0.1.js> Dev build with warnings: https://fb.me/react-dom-15.0.1.js
Minified build for production: <https://fb.me/react-dom-15.0.1.min.js> Minified build for production: https://fb.me/react-dom-15.0.1.min.js
## Changelog {/*changelog*/} ## Changelog {/*changelog*/}

4
beta/src/content/community/index.md

@ -16,7 +16,7 @@ Before participating in React's communities, [please read our Code of Conduct.](
Stack Overflow is a popular forum to ask code-level questions or if you're stuck with a specific error. Read through the [existing questions](https://stackoverflow.com/questions/tagged/reactjs) tagged with **reactjs** or [ask your own](https://stackoverflow.com/questions/ask?tags=reactjs)! Stack Overflow is a popular forum to ask code-level questions or if you're stuck with a specific error. Read through the [existing questions](https://stackoverflow.com/questions/tagged/reactjs) tagged with **reactjs** or [ask your own](https://stackoverflow.com/questions/ask?tags=reactjs)!
<!-- {/*
TODO: decide on the criteria for inclusion before uncommenting. (Change Popular Discussion Forums into heading while un-commenting) TODO: decide on the criteria for inclusion before uncommenting. (Change Popular Discussion Forums into heading while un-commenting)
@ -31,7 +31,7 @@ Each community consists of many thousands of React users.
* [Reactiflux online chat](https://discord.gg/reactiflux) * [Reactiflux online chat](https://discord.gg/reactiflux)
* [Reddit's React community](https://www.reddit.com/r/reactjs/) * [Reddit's React community](https://www.reddit.com/r/reactjs/)
--> */}
## News {/*news*/} ## News {/*news*/}

1
beta/src/content/learn/referencing-values-with-refs.md

@ -33,7 +33,6 @@ const ref = useRef(0);
`useRef` returns an object like this: `useRef` returns an object like this:
<!-- prettier-ignore -->
```js ```js
{ {
current: 0 // The value you passed to useRef current: 0 // The value you passed to useRef

8
beta/src/content/learn/responding-to-events.md

@ -316,10 +316,6 @@ Notice how the `App` component does not need to know *what* `Toolbar` will do wi
## Event propagation {/*event-propagation*/} ## Event propagation {/*event-propagation*/}
<!--
// TODO illo
-->
Event handlers will also catch events from any children your component might have. We say that an event "bubbles" or "propagates" up the tree: it starts with where the event happened, and then goes up the tree. Event handlers will also catch events from any children your component might have. We say that an event "bubbles" or "propagates" up the tree: it starts with where the event happened, and then goes up the tree.
This `<div>` contains two buttons. Both the `<div>` *and* each button have their own `onClick` handlers. Which handlers do you think will fire when you click a button? This `<div>` contains two buttons. Both the `<div>` *and* each button have their own `onClick` handlers. Which handlers do you think will fire when you click a button?
@ -420,10 +416,6 @@ As a result of `e.stopPropagation()`, clicking on the buttons now only shows a s
<DeepDive title="Capture phase events"> <DeepDive title="Capture phase events">
<!--
// TODO Illo
-->
In rare cases, you might need to catch all events on child elements, *even if they stopped propagation*. For example, maybe you want to log every click to analytics, regardless of the propagation logic. You can do this by adding `Capture` at the end of the event name: In rare cases, you might need to catch all events on child elements, *even if they stopped propagation*. For example, maybe you want to log every click to analytics, regardless of the propagation logic. You can do this by adding `Capture` at the end of the event name:
```js ```js

4
beta/src/content/learn/scaling-up-with-reducer-and-context.md

@ -231,12 +231,8 @@ And `TaskList` passes the event handlers to `Task`:
In a small example like this, this works well, but if you have tens or hundreds of components in the middle, passing down all state and functions can be quite frustrating! In a small example like this, this works well, but if you have tens or hundreds of components in the middle, passing down all state and functions can be quite frustrating!
<!--(TODO: illustration of prop drilling)-->
This is why, as an alternative to passing them through props, you might want to put both the `tasks` state and the `dispatch` function [into context.](/learn/passing-data-deeply-with-context) **This way, any component below `TaskApp` in the tree can read the tasks and dispatch actions without the repetitive "prop drilling".** This is why, as an alternative to passing them through props, you might want to put both the `tasks` state and the `dispatch` function [into context.](/learn/passing-data-deeply-with-context) **This way, any component below `TaskApp` in the tree can read the tasks and dispatch actions without the repetitive "prop drilling".**
<!--(TODO: illustration of context)-->
Here is how you can combine a reducer with context: Here is how you can combine a reducer with context:
1. **Create** the context. 1. **Create** the context.

2
beta/src/content/learn/updating-arrays-in-state.md

@ -460,8 +460,6 @@ Although `nextList` and `list` are two different arrays, **`nextList[0]` and `li
Objects are not _really_ located "inside" arrays. They might appear to be "inside" in code, but each object in an array is a separate value, to which the array "points". This is why you need to be careful when changing nested fields like `list[0]`. Another person's artwork list may point to the same element of the array! Objects are not _really_ located "inside" arrays. They might appear to be "inside" in code, but each object in an array is a separate value, to which the array "points". This is why you need to be careful when changing nested fields like `list[0]`. Another person's artwork list may point to the same element of the array!
<!-- TODOODLE -->
**When updating nested state, you need to create copies from the point where you want to update, and all the way up to the top level.** Let's see how this works. **When updating nested state, you need to create copies from the point where you want to update, and all the way up to the top level.** Let's see how this works.
In this example, two separate artwork lists have the same initial state. They are supposed to be isolated, but because of a mutation, their state is accidentally shared, and checking a box in one list affects the other list: In this example, two separate artwork lists have the same initial state. They are supposed to be isolated, but because of a mutation, their state is accidentally shared, and checking a box in one list affects the other list:

36
beta/src/pages/[[...markdownPath]].js

@ -55,7 +55,7 @@ function reviveNodeOnClient(key, val) {
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~ IMPORTANT: BUMP THIS IF YOU CHANGE ANY CODE BELOW ~~~ // ~~~~ IMPORTANT: BUMP THIS IF YOU CHANGE ANY CODE BELOW ~~~
const DISK_CACHE_BREAKER = 3; const DISK_CACHE_BREAKER = 4;
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Put MDX output into JSON for client. // Put MDX output into JSON for client.
@ -121,9 +121,22 @@ export async function getStaticProps(context) {
// Turn the MDX we just read into some JS we can execute. // Turn the MDX we just read into some JS we can execute.
const {remarkPlugins} = require('../../plugins/markdownToHtml'); const {remarkPlugins} = require('../../plugins/markdownToHtml');
const compileMdx = require('@mdx-js/mdx'); const {compile: compileMdx} = await import('@mdx-js/mdx');
const visit = (await import('unist-util-visit')).default;
const jsxCode = await compileMdx(mdxWithFakeImports, { const jsxCode = await compileMdx(mdxWithFakeImports, {
remarkPlugins, remarkPlugins: [...remarkPlugins, (await import('remark-gfm')).default],
rehypePlugins: [
// Support stuff like ```js App.js {1-5} active by passing it through.
function rehypeMetaAsAttributes() {
return (tree) => {
visit(tree, 'element', (node) => {
if (node.tagName === 'code' && node.data && node.data.meta) {
node.properties.meta = node.data.meta;
}
});
};
},
],
}); });
const {transform} = require('@babel/core'); const {transform} = require('@babel/core');
const jsCode = await transform(jsxCode, { const jsCode = await transform(jsxCode, {
@ -133,15 +146,20 @@ export async function getStaticProps(context) {
// Prepare environment for MDX. // Prepare environment for MDX.
let fakeExports = {}; let fakeExports = {};
// For each fake MDX import, give back the string component name. const fakeRequire = (name) => {
// It will get serialized later. if (name === 'react/jsx-runtime') {
const fakeRequire = (key) => key; return require('react/jsx-runtime');
const evalJSCode = new Function('require', 'exports', 'mdx', jsCode); } else {
const createElement = require('react').createElement; // For each fake MDX import, give back the string component name.
// It will get serialized later.
return name;
}
};
const evalJSCode = new Function('require', 'exports', jsCode);
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// THIS IS A BUILD-TIME EVAL. NEVER DO THIS WITH UNTRUSTED MDX (LIKE FROM CMS)!!! // THIS IS A BUILD-TIME EVAL. NEVER DO THIS WITH UNTRUSTED MDX (LIKE FROM CMS)!!!
// In this case it's okay because anyone who can edit our MDX can also edit this file. // In this case it's okay because anyone who can edit our MDX can also edit this file.
evalJSCode(fakeRequire, fakeExports, createElement); evalJSCode(fakeRequire, fakeExports);
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
const reactTree = fakeExports.default({}); const reactTree = fakeExports.default({});

1317
beta/yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save