Compare commits
86 Commits
v16.0.0-al
...
v0.13.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c98c7ccd28 | ||
|
|
78cca021f3 | ||
|
|
e1437078fc | ||
|
|
4f1c61f915 | ||
|
|
4cecb72965 | ||
|
|
db6dcd695f | ||
|
|
16cb748161 | ||
|
|
2e3ac9b683 | ||
|
|
3509628c22 | ||
|
|
742d8567e8 | ||
|
|
1c03cd6fd9 | ||
|
|
8b4377ed68 | ||
|
|
2c7e818c7c | ||
|
|
717ad76529 | ||
|
|
9b2176fc23 | ||
|
|
7b07d85398 | ||
|
|
6d021d31ef | ||
|
|
ed8b4d6533 | ||
|
|
440d7b9fd0 | ||
|
|
28483ea245 | ||
|
|
4d142ad5f1 | ||
|
|
4a700aedf8 | ||
|
|
4423200007 | ||
|
|
f4d7c704dd | ||
|
|
fab11d22b8 | ||
|
|
c3cf556ca0 | ||
|
|
3fd813f752 | ||
|
|
8109af6d7f | ||
|
|
e0c9fbc9f5 | ||
|
|
a1b4f40f9d | ||
|
|
aa7eb4302d | ||
|
|
5b18053ac0 | ||
|
|
03595c918a | ||
|
|
8680314086 | ||
|
|
396c6b68ed | ||
|
|
cc8f9d3c30 | ||
|
|
5daf9f39c0 | ||
|
|
8685fed099 | ||
|
|
4bf4112542 | ||
|
|
ff4c157ed7 | ||
|
|
397fa72d1d | ||
|
|
b2043987cc | ||
|
|
6343ec5d79 | ||
|
|
12b794a3b8 | ||
|
|
449726408e | ||
|
|
e63149d4f0 | ||
|
|
40f77d2715 | ||
|
|
1b4bc922f9 | ||
|
|
4c779313af | ||
|
|
be13240980 | ||
|
|
29f11069f3 | ||
|
|
263084f5b7 | ||
|
|
ad02e8bb56 | ||
|
|
35bc0f0b41 | ||
|
|
3b5ff0aea7 | ||
|
|
d77f417767 | ||
|
|
946c3f04cc | ||
|
|
d30547792c | ||
|
|
6d577d83b8 | ||
|
|
7f5292bea4 | ||
|
|
987f243c73 | ||
|
|
0a9d6c6bbf | ||
|
|
54e82a552a | ||
|
|
65f40df8b5 | ||
|
|
4924cdc436 | ||
|
|
67805ed12d | ||
|
|
5b86aca6ff | ||
|
|
d10c8fc1af | ||
|
|
9b7de5b196 | ||
|
|
f308c03455 | ||
|
|
d4424e87a7 | ||
|
|
3003dcc0b1 | ||
|
|
8436732a23 | ||
|
|
a82e70ed34 | ||
|
|
2e72fd8e43 | ||
|
|
6cc7567eff | ||
|
|
cfbf1d559f | ||
|
|
ce9fd5f028 | ||
|
|
9432aceb4d | ||
|
|
9f95d8793e | ||
|
|
9e0954abdd | ||
|
|
71f65d3da6 | ||
|
|
fe8d706c1c | ||
|
|
edb8f7f4af | ||
|
|
594f816930 | ||
|
|
94bf54a328 |
28
.babelrc
28
.babelrc
@@ -1,28 +0,0 @@
|
||||
{
|
||||
"presets": ["react"],
|
||||
"ignore": ["third_party"],
|
||||
"plugins": [
|
||||
"transform-class-properties",
|
||||
"syntax-trailing-function-commas",
|
||||
"transform-object-rest-spread",
|
||||
"transform-es2015-template-literals",
|
||||
"transform-es2015-literals",
|
||||
"transform-es2015-arrow-functions",
|
||||
"transform-es2015-block-scoped-functions",
|
||||
["transform-es2015-classes", { "loose": true }],
|
||||
"transform-es2015-object-super",
|
||||
"transform-es2015-shorthand-properties",
|
||||
"transform-es2015-computed-properties",
|
||||
"transform-es2015-for-of",
|
||||
"check-es2015-constants",
|
||||
["transform-es2015-spread", { "loose": true }],
|
||||
"transform-es2015-parameters",
|
||||
["transform-es2015-destructuring", { "loose": true }],
|
||||
["transform-es2015-block-scoping", { "throwIfClosureRequired": true }],
|
||||
"transform-es2015-modules-commonjs",
|
||||
"transform-es3-member-expression-literals",
|
||||
"transform-es3-property-literals",
|
||||
"./scripts/babel/transform-object-assign-require",
|
||||
"transform-react-jsx-source"
|
||||
]
|
||||
}
|
||||
@@ -6,7 +6,6 @@ charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
max_line_length = 80
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
# We can probably lint these later but not important at this point
|
||||
src/renderers/art
|
||||
src/shared/vendor
|
||||
src/vendor
|
||||
# eslint uses JSX* node types to determine if using JSX. esprima-fb still uses
|
||||
# XJS* nodes. When we fix that (https://github.com/facebook/esprima/pull/85) we
|
||||
# can enable linting the tests and fix those errors.
|
||||
src/**/__tests__/**
|
||||
# This should be enabled but that folder has too much in it that doesn't belong
|
||||
src/test
|
||||
test/the-files-to-test.generated.js
|
||||
# This is synced with a different file internally, don't want to lint it yet
|
||||
vendor/fbtransform/syntax.js
|
||||
vendor/jasmine/
|
||||
vendor/jasmine-jsreporter/
|
||||
# But not in docs/_js/examples/*
|
||||
docs/_js/*.js
|
||||
docs/js/
|
||||
docs/_site/
|
||||
# gems
|
||||
docs/vendor/bundle/
|
||||
# This should be more like examples/**/thirdparty/** but
|
||||
# we should fix https://github.com/facebook/esprima/pull/85 first
|
||||
examples/
|
||||
fixtures/
|
||||
# Ignore built files.
|
||||
build/
|
||||
coverage/
|
||||
scripts/bench/bench-*.js
|
||||
vendor/*
|
||||
**/node_modules
|
||||
|
||||
51
.eslintrc
Normal file
51
.eslintrc
Normal file
@@ -0,0 +1,51 @@
|
||||
---
|
||||
parser: esprima-fb
|
||||
|
||||
env:
|
||||
browser: true
|
||||
node: true
|
||||
|
||||
globals:
|
||||
__DEV__: true
|
||||
|
||||
rules:
|
||||
# ERRORS
|
||||
space-before-blocks: 2
|
||||
indent: [2, 2, indentSwitchCase: true]
|
||||
brace-style: 2
|
||||
space-after-keywords: 2
|
||||
strict: 2
|
||||
# We actually have a transform to support this and we fix this for bundled
|
||||
# releases but not for the npm package, so enforce it strictly
|
||||
no-comma-dangle: 2
|
||||
# Make this a warning for now. We do this in a few places so we might need to
|
||||
# disable
|
||||
no-unused-expressions: 2
|
||||
block-scoped-var: 2
|
||||
eol-last: 2
|
||||
dot-notation: 2
|
||||
consistent-return: 2
|
||||
no-unused-vars: [2, args: none]
|
||||
quotes: [2, 'single']
|
||||
|
||||
# WARNINGS
|
||||
# This is the only one that's hard to track since we don't lint just changes.
|
||||
max-len: [1, 80]
|
||||
|
||||
# WISHLIST. One day...
|
||||
# We'll need a custom version of this that does a subset of the whole rule.
|
||||
# Otherwise this is just too noisy.
|
||||
# valid-jsdoc: 1
|
||||
|
||||
# DISABLED. These aren't compatible with our style
|
||||
# We use this for private/internal variables
|
||||
no-underscore-dangle: 0
|
||||
# We pass constructors around / access them from members
|
||||
new-cap: 0
|
||||
# We do this a lot.
|
||||
no-use-before-define: 0
|
||||
# We do this in a few places to align values
|
||||
key-spacing: 0
|
||||
|
||||
# DISABLED. These currently cause errors when running.
|
||||
no-multi-spaces: 0
|
||||
62
.eslintrc.js
62
.eslintrc.js
@@ -1,62 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const OFF = 0;
|
||||
// const WARNING = 1;
|
||||
const ERROR = 2;
|
||||
|
||||
module.exports = {
|
||||
extends: 'fbjs',
|
||||
|
||||
plugins: [
|
||||
'react',
|
||||
'react-internal',
|
||||
],
|
||||
|
||||
// We're stricter than the default config, mostly. We'll override a few rules
|
||||
// and then enable some React specific ones.
|
||||
rules: {
|
||||
'accessor-pairs': OFF,
|
||||
'brace-style': [ERROR, '1tbs'],
|
||||
'comma-dangle': [ERROR, 'always-multiline'],
|
||||
'consistent-return': OFF,
|
||||
'dot-location': [ERROR, 'property'],
|
||||
'dot-notation': ERROR,
|
||||
'eol-last': ERROR,
|
||||
'eqeqeq': [ERROR, 'allow-null'],
|
||||
'indent': [ERROR, 2, {SwitchCase: 1}],
|
||||
'jsx-quotes': [ERROR, 'prefer-double'],
|
||||
'keyword-spacing': [ERROR, {after: true, before: true}],
|
||||
'no-bitwise': OFF,
|
||||
'no-inner-declarations': [ERROR, 'functions'],
|
||||
'no-multi-spaces': ERROR,
|
||||
'no-restricted-syntax': [ERROR, 'WithStatement'],
|
||||
'no-shadow': ERROR,
|
||||
'no-unused-expressions': ERROR,
|
||||
'no-unused-vars': [ERROR, {args: 'none'}],
|
||||
'quotes': [ERROR, 'single', {avoidEscape: true, allowTemplateLiterals: true }],
|
||||
'space-before-blocks': ERROR,
|
||||
'space-before-function-paren': [ERROR, {anonymous: 'never', named: 'never'}],
|
||||
|
||||
// React & JSX
|
||||
// Our transforms set this automatically
|
||||
'react/jsx-boolean-value': [ERROR, 'always'],
|
||||
'react/jsx-no-undef': ERROR,
|
||||
// We don't care to do this
|
||||
'react/jsx-sort-prop-types': OFF,
|
||||
'react/jsx-uses-react': ERROR,
|
||||
'react/no-is-mounted': OFF,
|
||||
// This isn't useful in our test code
|
||||
'react/react-in-jsx-scope': ERROR,
|
||||
'react/self-closing-comp': ERROR,
|
||||
// We don't care to do this
|
||||
'react/jsx-wrap-multilines': [ERROR, {declaration: false, assignment: false}],
|
||||
|
||||
// CUSTOM RULES
|
||||
// the second argument of warning/invariant should be a literal string
|
||||
'react-internal/warning-and-invariant-args': ERROR,
|
||||
},
|
||||
|
||||
globals: {
|
||||
expectDev: true,
|
||||
},
|
||||
};
|
||||
39
.flowconfig
39
.flowconfig
@@ -1,39 +0,0 @@
|
||||
[ignore]
|
||||
|
||||
<PROJECT_ROOT>/examples/.*
|
||||
<PROJECT_ROOT>/fixtures/.*
|
||||
<PROJECT_ROOT>/build/.*
|
||||
<PROJECT_ROOT>/.*/node_modules/y18n/.*
|
||||
<PROJECT_ROOT>/.*/__mocks__/.*
|
||||
<PROJECT_ROOT>/.*/__tests__/.*
|
||||
|
||||
# Ignore Docs
|
||||
<PROJECT_ROOT>/docs/.*
|
||||
<PROJECT_ROOT>/.*/docs/.*
|
||||
|
||||
[include]
|
||||
|
||||
[libs]
|
||||
./node_modules/fbjs/flow/lib/dev.js
|
||||
./flow
|
||||
|
||||
[options]
|
||||
module.system=haste
|
||||
|
||||
esproposal.class_static_fields=enable
|
||||
esproposal.class_instance_fields=enable
|
||||
|
||||
munge_underscores=false
|
||||
|
||||
suppress_type=$FlowIssue
|
||||
suppress_type=$FlowFixMe
|
||||
suppress_type=$FixMe
|
||||
suppress_type=$FlowExpectedError
|
||||
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-3]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*www[a-z,_]*\\)?)\\)
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-3]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*www[a-z,_]*\\)?)\\)?:? #[0-9]+
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
|
||||
|
||||
[version]
|
||||
^0.37.0
|
||||
9
.github/ISSUE_TEMPLATE.md
vendored
9
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,9 +0,0 @@
|
||||
**Do you want to request a *feature* or report a *bug*?**
|
||||
|
||||
**What is the current behavior?**
|
||||
|
||||
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/reactjs/69z2wepo/).**
|
||||
|
||||
**What is the expected behavior?**
|
||||
|
||||
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
|
||||
10
.github/PULL_REQUEST_TEMPLATE.md
vendored
10
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,10 +0,0 @@
|
||||
**Before submitting a pull request,** please make sure the following is done:
|
||||
|
||||
1. Fork [the repository](https://github.com/facebook/react) and create your branch from `master`.
|
||||
2. If you've added code that should be tested, add tests!
|
||||
3. If you've changed APIs, update the documentation.
|
||||
4. Ensure the test suite passes (`npm test`).
|
||||
5. Make sure your code lints (`npm run lint`).
|
||||
6. Run the [Flow](https://flowtype.org/) typechecks (`npm run flow`).
|
||||
7. If you added or removed any tests, run `./scripts/fiber/record-tests` before submitting the pull request, and commit the resulting changes.
|
||||
8. If you haven't already, complete the [CLA](https://code.facebook.com/cla).
|
||||
11
.gitignore
vendored
11
.gitignore
vendored
@@ -7,7 +7,6 @@ static
|
||||
_SpecRunner.html
|
||||
__benchmarks__
|
||||
build/
|
||||
coverage/
|
||||
.module-cache
|
||||
*.gem
|
||||
docs/.bundle
|
||||
@@ -15,17 +14,9 @@ docs/code
|
||||
docs/_site
|
||||
docs/.sass-cache
|
||||
docs/js/*
|
||||
docs/downloads/*.zip
|
||||
docs/downloads
|
||||
docs/vendor/bundle
|
||||
examples/shared/*.js
|
||||
examples/**/bundle.js
|
||||
fixtures/dom/public/react-dom.js
|
||||
fixtures/dom/public/react.js
|
||||
test/the-files-to-test.generated.js
|
||||
*.log*
|
||||
chrome-user-data
|
||||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
.idea
|
||||
*.iml
|
||||
.vscode
|
||||
|
||||
73
.mailmap
73
.mailmap
@@ -1,119 +1,62 @@
|
||||
Adam Timberlake <adam.timberlake@gmail.com>
|
||||
Alex Mykyta <dancingwithcows@gmail.com>
|
||||
Alex Pien <alexpien@gmail.com>
|
||||
Alex Pien <alexpien@gmail.com> <pien@pien-mbp.dhcp.thefacebook.com>
|
||||
Alex Pien <alexpien@gmail.com> <pien@pien-mbp.local>
|
||||
Andreas Savvides <asavvides@twitter.com> <AnSavvides@users.noreply.github.com>
|
||||
Andreas Savvides <asavvides@twitter.com> <andreas@nibbli.com>
|
||||
Andreas Svensson <andreas@syranide.com>
|
||||
Andres Suarez <zertosh@gmail.com>
|
||||
Andrew Kulakov <avk@8xx8.ru>
|
||||
Andrew Sokolov <asokolov@atlassian.com>
|
||||
Anto Aravinth <anto.aravinth.cse@gmail.com>
|
||||
Baraa Hamodi <bhamodi@uwaterloo.ca> <baraa@optimizely.com>
|
||||
Ben Alpert <ben@benalpert.com> <balpert@fb.com>
|
||||
Ben Alpert <ben@benalpert.com> <spicyjalapeno@gmail.com>
|
||||
Ben Halpern <bendhalpern@gmail.com>
|
||||
Ben Newman <bn@cs.stanford.edu> <benjamn@fb.com>
|
||||
Benjamin Woodruff <github@benjam.info> <bgw@fb.com>
|
||||
Bill Fisher <fisherwebdev@gmail.com>
|
||||
Blaine Kasten <blainekasten@gmail.com>
|
||||
Brandon Tilley <brandon@brandontilley.com>
|
||||
Changsoon Bok <winmain@gmail.com>
|
||||
Cheng Lou <chenglou92@gmail.com> <chenglou@fb.com>
|
||||
Christian Oliff <christianoliff@yahoo.com>
|
||||
Christoph Pojer <christoph.pojer@gmail.com>
|
||||
Christoph Pojer <christoph.pojer@gmail.com> <cpojer@fb.com>
|
||||
Connor McSheffrey <c@conr.me> <connor.mcsheffrey@gmail.com>
|
||||
Conor Hastings <hastings.conorm@gmail.com> <conor@socialtables.com>
|
||||
Dan Schafer <dschafer@fb.com>
|
||||
Daniel Gasienica <daniel@gasienica.ch> <daniel@fiftythree.com>
|
||||
Daniel Gasienica <daniel@gasienica.ch> <dgasienica@zynga.com>
|
||||
Daniel Hejl <daniel.hejl@hotmail.com>
|
||||
Daniel Lo Nigro <daniel@dan.cx> <danlo@fb.com>
|
||||
Dave Galbraith <dave@jut.io>
|
||||
Dennis Johnson <songawee@gmail.com>
|
||||
Dmitry Blues <dmitri.blyus@gmail.com>
|
||||
Dongsheng Liu <bellanchor@gmail.com>
|
||||
Erik Harper <eharper@mixpo.com>
|
||||
Evan Coonrod <evan@paloalto.com>
|
||||
Fabio M. Costa <fabiomcosta@gmail.com> <fabs@fb.com>
|
||||
Felix Kling <felix.kling@gmx.net> <fkling@fb.com>
|
||||
François-Xavier Bois <fxbois@gmail.com>
|
||||
Fyodor Ivanishchev <cbrwizard@gmail.com>
|
||||
Gabe Levi <gabelevi@gmail.com> <glevi@fb.com>
|
||||
Geert Pasteels <geert.pasteels@gmail.com>
|
||||
George A Sisco III <george.sisco@gmail.com>
|
||||
Georgii Dolzhykov <thorn.mailbox@gmail.com>
|
||||
Harry Hull <harry.hull1@gmail.com>
|
||||
Hendrik Swanepoel <hendrik.swanepoel@gmail.com>
|
||||
Hyeock Kwon <doublus@gmail.com>
|
||||
Ian Obermiller <ian@obermillers.com> <iano@fb.com>
|
||||
Ilia Pavlenkov <dortonway@gmail.com>
|
||||
Ilyá Belsky <gelias.gbelsky@gmail.com>
|
||||
Ingvar Stepanyan <me@rreverser.com> <rreverser@ubuntu.rreverser.a4.internal.cloudapp.net>
|
||||
Irae Carvalho <irae@irae.pro.br>
|
||||
Ivan Vergiliev <ivan.vergiliev@gmail.com>
|
||||
JJ Weber <jj.weber@gmail.com>
|
||||
Jae Hun Ro <jhr24@duke.edu>
|
||||
Jaime Mingo <j.mingov@3boll.com>
|
||||
James Brantly <james@jbrantly.com>
|
||||
Jan Hancic <jan.hancic@gmail.com> <jan.hancic@caplin.com>
|
||||
Jan Kassens <jan@kassens.net> <jkassens@fb.com>
|
||||
Jason Bonta <jbonta@gmail.com> <jasonbonta@fb.com>
|
||||
Jason Quense <monastic.panic@gmail.com>
|
||||
Jason Trill <jason@jasontrill.com>
|
||||
Jeff Chan <jefftchan@gmail.com> <jeff@quizlet.com>
|
||||
Jeff Morrison <jeff@anafx.com> <Jeff@anafx.com>
|
||||
Jeff Morrison <jeff@anafx.com> <jeffmo@fb.com>
|
||||
Jeff Morrison <jeff@anafx.com> <lbljeffmo@gmail.com>
|
||||
Jeffrey Lin <lin.jeffrey@gmail.com> <jeffreylin@fb.com>
|
||||
Jim Sproch <jsproch@fb.com>
|
||||
Jim Sproch <jsproch@fb.com> <jsfb@github>
|
||||
Jim Sproch <jsproch@fb.com> <none@no-reply.com>
|
||||
Jinwoo Oh <arkist@gmail.com>
|
||||
Jinxiu Lee <lee.jinxiu@gmail.com>
|
||||
Jiyeon Seo <zzzeons@gmail.com>
|
||||
Jon Chester <jonchester@fb.com>
|
||||
Jon Madison <jon@tfftech.com>
|
||||
Jonathan Hsu <jhiswin@gmail.com>
|
||||
Jonathan Persson <persson.jonathan@gmail.com> <jonathan.persson@creuna.se>
|
||||
Jordan Walke <jordojw@gmail.com>
|
||||
Jordan Walke <jordojw@gmail.com> <jordanjcw@fb.com>
|
||||
Joseph Savona <joesavona@fb.com> <josephsavona@users.noreply.github.com>
|
||||
Josh Duck <josh@fb.com> <github@joshduck.com>
|
||||
Juan Serrano <germ13@users.noreply.github.com>
|
||||
Jun Wu <quark@lihdd.net>
|
||||
Justin Robison <jrobison151@gmail.com>
|
||||
Keito Uchiyama <projects@keito.me> <keito@fb.com>
|
||||
Kevin Coughlin <kevintcoughlin@gmail.com> <kevincoughlin@tumblr.com>
|
||||
Krystian Karczewski <karcz.k@gmail.com>
|
||||
Kunal Mehta <k.mehta@berkeley.edu> <kunalm@fb.com>
|
||||
Laurence Rowe <l@lrowe.co.uk> <laurence@lrowe.co.uk>
|
||||
Marcin K. <katzoo@github.mail>
|
||||
Mark Anderson <undernewmanagement@users.noreply.github.com>
|
||||
Mark Funk <mfunk86@gmail.com> <mark@boomtownroi.com>
|
||||
Martin Andert <mandert@gmail.com>
|
||||
Mathieu M-Gosselin <mathieumg@gmail.com> <mathieumg@atx33.com>
|
||||
Matsunoki <himkt@klis.tsukuba.ac.jp>
|
||||
Matt Brookes <matt@brookes.net>
|
||||
Matt Dunn-Rankin <mdunnrankin@gmail.com> <matchu1993@gmail.com>
|
||||
Matt Zabriskie <mzabriskie@gmail.com>
|
||||
Matthew Johnston <matthewjohnston4@outlook.com> <matthewjohnston4@users.noreply.github.com>
|
||||
Matthew Looi <looi.matthew@gmail.com>
|
||||
Mattijs Kneppers <mattijs@arttech.nl>
|
||||
Max Heiber <max.heiber@gmail.com>
|
||||
Max Stoiber <contact@mstoiber.com>
|
||||
Michal Srb <xixixao@seznam.cz> xixixao <xixixao@seznam.cz>
|
||||
Michelle Todd <himichelletodd@gmail.com> <michelle@khanacademy.org>
|
||||
Mihai Parparita <mihai.parparita@gmail.com> <mihai@persistent.info>
|
||||
Minwe LUO <minwe@yunshipei.com>
|
||||
Murray M. Moss <murray@mmoss.name> <MMoss@cainc.com>
|
||||
Murray M. Moss <murray@mmoss.name> <mmoss@users.noreply.github.com>
|
||||
Neri Marschik <marschik_neri@cyberagent.co.jp>
|
||||
Nick Gavalas <njg57@cornell.edu>
|
||||
Nick Thompson <ncthom91@gmail.com> <nickt@instagram.com>
|
||||
Patrick Stapleton <github@gdi2290.com>
|
||||
Paul O’Shannessy <paul@oshannessy.com> <poshannessy@fb.com>
|
||||
Paul Shen <paul@mnml0.com> <paulshen@fb.com>
|
||||
Pete Hunt <floydophone@gmail.com>
|
||||
@@ -124,39 +67,23 @@ Petri Lievonen <plievone@cc.hut.fi>
|
||||
Petri Lievonen <plievone@cc.hut.fi> <petri.lievonen@tkk.fi>
|
||||
Pieter Vanderwerff <me@pieter.io> <pieter@heyday.co.nz>
|
||||
Pouja Nikray <poujanik@gmail.com>
|
||||
Rainer Oviir <roviir@gmail.com> <raineroviir@rainers-MacBook-Pro.local>
|
||||
Ray <ray@tomo.im>
|
||||
Richard Feldman <richard.t.feldman@gmail.com> <richard@noredink.com>
|
||||
Richard Livesey <Livesey7@hotmail.co.uk>
|
||||
Rob Arnold <robarnold@cs.cmu.edu>
|
||||
Robert Binna <rbinna@gmail.com> <speedskater@users.noreply.github.com>
|
||||
Robin Frischmann <robin@rofrischmann.de>
|
||||
Sander Spies <sandermail@gmail.com>
|
||||
Scott Feeney <scott@oceanbase.org> <smf@fb.com>
|
||||
Sebastian Markbåge <sebastian@calyptus.eu> <sema@fb.com>
|
||||
Sergey Rubanov <chi187@gmail.com>
|
||||
Shogun Sea <shogunsea08@gmail.com> <xxin@groupon.com>
|
||||
Soichiro Kawamura <mail@w-st.com>
|
||||
Sota Ohara <ohrst.18@gmail.com>
|
||||
Steven Luscher <react@steveluscher.com> <github@steveluscher.com>
|
||||
Steven Luscher <react@steveluscher.com> <steveluscher@fb.com>
|
||||
Steven Luscher <react@steveluscher.com> <steveluscher@instagram.com>
|
||||
Steven Luscher <react@steveluscher.com> <steveluscher@users.noreply.github.com>
|
||||
Stoyan Stefanov <ssttoo@ymail.com>
|
||||
Tengfei Guo <terryr3rd@yeah.net> <tfguo369@gmail.com>
|
||||
Thomas Aylott <oblivious@subtlegradient.com> <aylott@fb.com>
|
||||
Timothy Yung <yungsters@gmail.com> <yungsters@fb.com>
|
||||
Tomoya Suzuki <tmysz.dev@gmail.com>
|
||||
Vasiliy Loginevskiy <Yeti.or@gmail.com>
|
||||
Vasiliy Loginevskiy <Yeti.or@gmail.com> <yeti-or@yandex-team.ru>
|
||||
Vjeux <vjeuxx@gmail.com>
|
||||
Vjeux <vjeuxx@gmail.com> <vjeux@fb.com>
|
||||
Volkan Unsal <spocksplanet@gmail.com>
|
||||
Wander Wang <wander.wang@ismole.com>
|
||||
Xavier Morel <xmo-odoo@users.noreply.github.com>
|
||||
YouBao Nong <noyobo@gmail.com> <nongyoubao@alibaba-inc.com>
|
||||
Yutaka Nakajima <nakazye@gmail.com>
|
||||
Zach Bruggeman <mail@bruggie.com> <zbruggeman@me.com>
|
||||
iawia002 <z2d@jifangcheng.com> <850127508@qq.com>
|
||||
元彦 <yuanyan@users.noreply.github.com>
|
||||
张敏 <cookfront@gmail.com>
|
||||
|
||||
119
.travis.yml
119
.travis.yml
@@ -1,36 +1,20 @@
|
||||
---
|
||||
sudo: required
|
||||
dist: trusty
|
||||
language: node_js
|
||||
node_js:
|
||||
- 6
|
||||
rvm:
|
||||
- 2.2.3
|
||||
- '0.10'
|
||||
sudo: false
|
||||
cache:
|
||||
directories:
|
||||
- docs/vendor/bundle
|
||||
- node_modules
|
||||
- $HOME/.yarn-cache
|
||||
before_install:
|
||||
- |
|
||||
echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" >~/.netrc
|
||||
unset GITHUB_TOKEN
|
||||
|
||||
if [ "$TEST_TYPE" != build_website ] && \
|
||||
! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(^(docs|examples))/'
|
||||
then
|
||||
echo "Only docs were updated, stopping build process."
|
||||
exit
|
||||
fi
|
||||
|
||||
sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
|
||||
echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y -qq yarn
|
||||
yarn --version
|
||||
install:
|
||||
- |
|
||||
yarn install
|
||||
script:
|
||||
- |
|
||||
if [ "$TEST_TYPE" = build_website ]; then
|
||||
@@ -38,8 +22,9 @@ script:
|
||||
set -e
|
||||
|
||||
GH_PAGES_DIR="$TRAVIS_BUILD_DIR"/../react-gh-pages
|
||||
git config --global user.name "$GITHUB_USER_NAME"
|
||||
git config --global user.email "$GITHUB_USER_EMAIL"
|
||||
echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" >~/.netrc
|
||||
git config --global user.name "Travis CI"
|
||||
git config --global user.email "travis@reactjs.org"
|
||||
|
||||
git clone --branch gh-pages --depth=50 \
|
||||
https://reactjs-bot@github.com/facebook/react.git \
|
||||
@@ -49,83 +34,61 @@ script:
|
||||
bundle exec rake release
|
||||
cd $GH_PAGES_DIR
|
||||
git status
|
||||
if test -n "$(git status --porcelain)"; then
|
||||
if ! git diff-index --quiet HEAD --; then
|
||||
git add -A .
|
||||
git commit -m "Rebuild website"
|
||||
git push origin gh-pages
|
||||
fi
|
||||
popd
|
||||
fi
|
||||
elif [ "$TEST_TYPE" = build ]; then
|
||||
if [ "$SERVER" ]; then
|
||||
set -e
|
||||
./node_modules/.bin/grunt build
|
||||
curl \
|
||||
-F "react=@build/react.js" \
|
||||
-F "react.min=@build/react.min.js" \
|
||||
-F "react-with-addons=@build/react-with-addons.js" \
|
||||
-F "react-with-addons.min=@build/react-with-addons.min.js" \
|
||||
-F "react-dom=@build/react-dom.js" \
|
||||
-F "react-dom.min=@build/react-dom.min.js" \
|
||||
-F "react-dom-server=@build/react-dom-server.js" \
|
||||
-F "react-dom-server.min=@build/react-dom-server.min.js" \
|
||||
-F "npm-react=@build/packages/react.tgz" \
|
||||
-F "npm-react-dom=@build/packages/react-dom.tgz" \
|
||||
-F "npm-react-native=@build/packages/react-native-renderer.tgz" \
|
||||
-F "commit=$TRAVIS_COMMIT" \
|
||||
-F "date=`git log --format='%ct' -1`" \
|
||||
-F "pull_request=$TRAVIS_PULL_REQUEST" \
|
||||
-F "token=$SECRET_TOKEN" \
|
||||
-F "branch=$TRAVIS_BRANCH" \
|
||||
$SERVER
|
||||
fi
|
||||
elif [ "$TEST_TYPE" = test ]; then
|
||||
set -e
|
||||
./node_modules/.bin/grunt jest:coverage
|
||||
cat ./coverage/lcov.info | ./node_modules/.bin/coveralls
|
||||
|
||||
echo 'Testing in server-render (HTML generation) mode...'
|
||||
printf '\nmodule.exports.useCreateElement = false;\n' \
|
||||
>> src/renderers/dom/shared/ReactDOMFeatureFlags.js
|
||||
./node_modules/.bin/grunt jest:normal
|
||||
git checkout -- src/renderers/dom/shared/ReactDOMFeatureFlags.js
|
||||
|
||||
echo 'Testing in fiber mode...'
|
||||
scripts/fiber/record-tests --track-facts
|
||||
git --no-pager diff scripts/fiber
|
||||
FIBER_TESTS_STATUS=$(git status --porcelain scripts/fiber)
|
||||
test -z "$FIBER_TESTS_STATUS"
|
||||
|
||||
./node_modules/.bin/gulp react:extract-errors
|
||||
elif [ "$TEST_TYPE" = flow ]; then
|
||||
set -e
|
||||
./node_modules/.bin/grunt flow
|
||||
|
||||
ALL_FILES=`find src -name '*.js' | grep -v umd/ | grep -v __tests__ | grep -v __mocks__`
|
||||
COUNT_ALL_FILES=`echo "$ALL_FILES" | wc -l`
|
||||
COUNT_WITH_FLOW=`grep '@flow' $ALL_FILES | perl -pe 's/:.+//' | wc -l`
|
||||
node scripts/facts-tracker/index.js \
|
||||
"flow-files" "$COUNT_WITH_FLOW/$COUNT_ALL_FILES"
|
||||
|
||||
else
|
||||
./node_modules/.bin/grunt $TEST_TYPE
|
||||
grunt $TEST_TYPE
|
||||
fi
|
||||
after_script:
|
||||
- |
|
||||
if [ "$TEST_TYPE" = test ] && [ "$SERVER" ]; then
|
||||
grunt build
|
||||
curl \
|
||||
-F "react=@build/react.js" \
|
||||
-F "react.min=@build/react.min.js" \
|
||||
-F "transformer=@build/JSXTransformer.js" \
|
||||
-F "react-with-addons=@build/react-with-addons.js" \
|
||||
-F "react-with-addons.min=@build/react-with-addons.min.js" \
|
||||
-F "npm-react=@build/react.tgz" \
|
||||
-F "npm-react-tools=@build/react-tools.tgz" \
|
||||
-F "commit=$TRAVIS_COMMIT" \
|
||||
-F "date=`git log --format='%ct' -1`" \
|
||||
-F "pull_request=$TRAVIS_PULL_REQUEST" \
|
||||
-F "token=$SECRET_TOKEN" \
|
||||
-F "branch=$TRAVIS_BRANCH" \
|
||||
$SERVER
|
||||
fi
|
||||
env:
|
||||
matrix:
|
||||
- TEST_TYPE=build
|
||||
- TEST_TYPE=test
|
||||
- TEST_TYPE=jest
|
||||
- TEST_TYPE=lint
|
||||
- TEST_TYPE=flow
|
||||
- TEST_TYPE=build_website
|
||||
- TEST_TYPE=test:webdriver:saucelabs:modern
|
||||
global:
|
||||
# SERVER
|
||||
- secure: qPvsJ46XzGrdIuPA70b55xQNGF8jcK7N1LN5CCQYYocXLa+fBrl+fTE77QvehOPhqwJXcj6kOxI+sY0KrVwV7gmq2XY2HZGWUSCxTN0SZlNIzqPA80Y7G/yOjA4PUt8LKgP+8tptyhTAY56qf+hgW8BoLiKOdztYF2p+3zXOLuA=
|
||||
# SECRET_TOKEN
|
||||
- secure: dkpPW+VnoqC/okhRdV90m36NcyBFhcwEKL3bNFExAwi0dXnFao8RoFlvnwiPlA23h2faROkMIetXlti6Aju08BgUFV+f9aL6vLyU7gUent4Nd3413zf2fwDtXIWIETg6uLnOpSykGKgCAT/hY3Q2oPLqOoY0OxfgnbqwxkxljrE=
|
||||
# GITHUB_TOKEN
|
||||
- secure: Sn+HwLSkbgM5MqVszq/CJHcOsZax17zwW0ILpGgAaEKD6MHNmEBdc71skaLr+6R4gHVO5ybV2cgSxHuBLHKzYoidq5ksGKRHNeXfyOv8jeHGTN/FjwMQbM+WkIK3wFroLsuQ1kW2FBfFEXqx4rET6GXwdcqycGl8GSFB1l0VNzE=
|
||||
# COVERALLS_TOKEN
|
||||
- secure: h/cUq+TrUMZOQmkFD7CvuwX0uAwmjIfKZ4qSUzY+QzUtDzOzA0L/XF84xTBq1Q5YYsEiaoF6GxxGCdrLQiBA/ZTd+88UHgeZPMRvi0xG9Q+PeePVOsZMTxy4/WWFgOfSQCk49Mj9zizGgO78i6vxq+SDXMtFHnZ+TpPJIEW6/m0=
|
||||
- secure: EHCyCSKMwKlLHNtcj9nmkRzmiiPE3aDGlPcnEyrDJeRI0SeN/iCXHXfFivR0vFq3vr+9naMBczAR2AEidtps5KbJrKqdZnjPFRbmfVtzWr/LlvVCub3u13Pub6TdKIVBTny1PuZ5X8GvdxMNVig89jGjvzhhWuQRaz3VhJnTra4=
|
||||
matrix:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- env: TEST_TYPE=test:coverage
|
||||
- env: TEST_TYPE=perf:full
|
||||
- env: TEST_TYPE=test:webdriver:saucelabs:modern
|
||||
- env: TEST_TYPE=test:webdriver:saucelabs BROWSER_NAME=ie11
|
||||
- env: TEST_TYPE=test:webdriver:saucelabs BROWSER_NAME=ie10
|
||||
- env: TEST_TYPE=test:webdriver:saucelabs BROWSER_NAME=ie9
|
||||
- env: TEST_TYPE=test:webdriver:saucelabs BROWSER_NAME=ie8
|
||||
- env: TEST_TYPE=test:webdriver:saucelabs:ios
|
||||
- env: TEST_TYPE=test:webdriver:saucelabs BROWSER_NAME=safari
|
||||
notifications:
|
||||
irc:
|
||||
use_notice: true
|
||||
|
||||
361
AUTHORS
361
AUTHORS
@@ -1,92 +1,45 @@
|
||||
839 <8398a7@gmail.com>
|
||||
Aaron Franks <aaron.franks@gmail.com>
|
||||
Aaron Gelter <aaron.gelter@harman.com>
|
||||
Adam Bloomston <adam@glitterfram.es>
|
||||
Adam Krebs <amk528@cs.nyu.edu>
|
||||
Adam Mark <adammark75@gmail.com>
|
||||
Adam Solove <asolove@gmail.com>
|
||||
Adam Timberlake <adam.timberlake@gmail.com>
|
||||
Adam Zapletal <adamzap@gmail.com>
|
||||
Ahmad Wali Sidiqi <wali-s@users.noreply.github.com>
|
||||
Alan Plum <me@pluma.io>
|
||||
Alan Souza <alansouzati@gmail.com>
|
||||
Alan deLevie <adelevie@gmail.com>
|
||||
Alastair Hole <afhole@gmail.com>
|
||||
Alex <ultrafez@users.noreply.github.com>
|
||||
Alex Boatwright <drdelambre@gmail.com>
|
||||
Alex Boyd <alex@opengroove.org>
|
||||
Alex Dajani <xelad1@gmail.com>
|
||||
Alex Lopatin <alex@alexlopatin.com>
|
||||
Alex Mykyta <dancingwithcows@gmail.com>
|
||||
Alex Pien <alexpien@gmail.com>
|
||||
Alex Smith <iqwz@ya.ru>
|
||||
Alex Zelenskiy <azelenskiy@fb.com>
|
||||
Alexander Shtuchkin <ashtuchkin@gmail.com>
|
||||
Alexander Solovyov <alexander@solovyov.net>
|
||||
Alexander Tseung <alextsg@gmail.com>
|
||||
Alexandre Gaudencio <shahor@shahor.fr>
|
||||
Alexey Raspopov <avenger7x13@gmail.com>
|
||||
Alexey Shamrin <shamrin@gmail.com>
|
||||
Ali Ukani <ali.ukani@gmail.com>
|
||||
Andre Z Sanchez <andrezacsanchez@gmail.com>
|
||||
Andreas Savvides <asavvides@twitter.com>
|
||||
Andreas Svensson <andreas@syranide.com>
|
||||
Andres Kalle <mjomble@gmail.com>
|
||||
Andres Suarez <zertosh@gmail.com>
|
||||
Andrew Clark <acdlite@me.com>
|
||||
Andrew Cobby <cobbweb@users.noreply.github.com>
|
||||
Andrew Davey <andrew@equin.co.uk>
|
||||
Andrew Henderson <andrew.m.henderson@gmail.com>
|
||||
Andrew Kulakov <avk@8xx8.ru>
|
||||
Andrew Rasmussen <andras@fb.com>
|
||||
Andrew Sokolov <asokolov@atlassian.com>
|
||||
Andrew Zich <azich@fb.com>
|
||||
Andrey Popp <8mayday@gmail.com>
|
||||
Anthony van der Hoorn <anthony.vanderhoorn@gmail.com>
|
||||
Anto Aravinth <anto.aravinth.cse@gmail.com>
|
||||
Antonio Ruberto <anto.ruberto@gmail.com>
|
||||
Antti Ahti <antti.ahti@gmail.com>
|
||||
Anuj Tomar <ankuto@gmail.com>
|
||||
AoDev <AoDev@users.noreply.github.com>
|
||||
April Arcus <april.arcus@gmail.com>
|
||||
Areeb Malik <areeb.malik91@gmail.com>
|
||||
Aria Buckles <aria@khanacademy.org>
|
||||
Aria Stewart <aredridel@dinhe.net>
|
||||
Arian Faurtosh <arian@icloud.com>
|
||||
Artem Nezvigin <artem@artnez.com>
|
||||
Austin Wright <aaa@bzfx.net>
|
||||
Ayman Osman <aymano.osman@gmail.com>
|
||||
Baraa Hamodi <bhamodi@uwaterloo.ca>
|
||||
Bartosz Kaszubowski <gosimek@gmail.com>
|
||||
Basarat Ali Syed <basaratali@gmail.com>
|
||||
Battaile Fauber <battaile@gmail.com>
|
||||
Beau Smith <beau@beausmith.com>
|
||||
Ben Alpert <ben@benalpert.com>
|
||||
Ben Anderson <banderson@constantcontact.com>
|
||||
Ben Brooks <ben@benbrooks.net>
|
||||
Ben Foxall <benfoxall@gmail.com>
|
||||
Ben Halpern <bendhalpern@gmail.com>
|
||||
Ben Jaffe <jaffe.ben@gmail.com>
|
||||
Ben Moss <ben@mossity.com>
|
||||
Ben Newman <bn@cs.stanford.edu>
|
||||
Ben Ripkens <bripkens.dev@gmail.com>
|
||||
Benjamin Keen <ben.keen@gmail.com>
|
||||
Benjamin Leiken <benleiken@gmail.com>
|
||||
Benjamin Woodruff <github@benjam.info>
|
||||
Benjy Cui <benjytrys@gmail.com>
|
||||
Bill Blanchard <bill@plumbdev.com>
|
||||
Bill Fisher <fisherwebdev@gmail.com>
|
||||
Blaine Hatab <jbhatab@gmail.com>
|
||||
Blaine Kasten <blainekasten@gmail.com>
|
||||
Bob Eagan <bob@synapsestudios.com>
|
||||
Bob Ralian <bob.ralian@gmail.com>
|
||||
Bob Renwick <bob.renwick@gmail.com>
|
||||
Bobby <puppybytes@gmail.com>
|
||||
Bojan Mihelac <bmihelac@mihelac.org>
|
||||
Bradley Spaulding <brad.spaulding@gmail.com>
|
||||
Brandon Bloom <brandon@brandonbloom.name>
|
||||
Brandon Tilley <brandon@brandontilley.com>
|
||||
Brenard Cubacub <bcbcb@users.noreply.github.com>
|
||||
Brian Cooke <bri@bricooke.com>
|
||||
Brian Holt <btholt@gmail.com>
|
||||
Brian Hsu <brianhsu@Brians-MacBook-Pro.local>
|
||||
@@ -97,412 +50,205 @@ Brian Rue <brian@rollbar.com>
|
||||
Bruno Škvorc <bruno@skvorc.me>
|
||||
Cam Song <neosoyn@gmail.com>
|
||||
Cam Spiers <camspiers@gmail.com>
|
||||
Cameron Chamberlain <git@camjc.com>
|
||||
Cameron Matheson <cameron@instructure.com>
|
||||
Carter Chung <carterchung@users.noreply.github.com>
|
||||
Cassus Adam Banko <banko.adam@gmail.com>
|
||||
Cat Chen <catchen@fb.com>
|
||||
Cedric Sohrauer <cedric.sohrauer@infopark.de>
|
||||
Cesar William Alvarenga <cesarwbr@gmail.com>
|
||||
Changsoon Bok <winmain@gmail.com>
|
||||
Charles Marsh <charlie@khanacademy.org>
|
||||
Chase Adams <realchaseadams@gmail.com>
|
||||
Cheng Lou <chenglou92@gmail.com>
|
||||
Chitharanjan Das <das.chitharanjan@gmail.com>
|
||||
Chris Bolin <bolin.chris@gmail.com>
|
||||
Chris Grovers <chrisgrovers@users.noreply.github.com>
|
||||
Chris Ha <chriskevinha@gmail.com>
|
||||
Chris Rebert <github@rebertia.com>
|
||||
Chris Sciolla <csciolla1@gmail.com>
|
||||
Christian <christianoliff@yahoo.com>
|
||||
Christian Alfoni <christianalfoni@gmail.com>
|
||||
Christian Oliff <christianoliff@yahoo.com>
|
||||
Christian Roman <chroman16@gmail.com>
|
||||
Christoffer Sawicki <christoffer.sawicki@gmail.com>
|
||||
Christoph Pojer <christoph.pojer@gmail.com>
|
||||
Christopher Monsanto <chris@monsan.to>
|
||||
Clay Allsopp <clay.allsopp@gmail.com>
|
||||
Connor McSheffrey <c@conr.me>
|
||||
Conor Hastings <hastings.conorm@gmail.com>
|
||||
Cory House <housecor@gmail.com>
|
||||
Cotton Hou <himcotton@gmail.com>
|
||||
Craig Akimoto <strawbrary@users.noreply.github.com>
|
||||
Cristovao Verstraeten <cristovao@apleasantview.com>
|
||||
Damien Pellier <dpellier@leadformance.com>
|
||||
Dan Abramov <dan.abramov@gmail.com>
|
||||
Dan Fox <iamdanfox@gmail.com>
|
||||
Dan Schafer <dschafer@fb.com>
|
||||
Daniel Carlsson <daniel.carlsson.1987@gmail.com>
|
||||
Daniel Cousens <dcousens@users.noreply.github.com>
|
||||
Daniel Friesen <daniel@nadir-seen-fire.com>
|
||||
Daniel Gasienica <daniel@gasienica.ch>
|
||||
Daniel Hejl <daniel.hejl@hotmail.com>
|
||||
Daniel Hejl <hejldaniel@gmail.com>
|
||||
Daniel Lo Nigro <daniel@dan.cx>
|
||||
Daniel Mané <danmane@gmail.com>
|
||||
Daniel Miladinov <dmiladinov@wingspan.com>
|
||||
Daniel Rodgers-Pryor <djrodgerspryor@gmail.com>
|
||||
Daniel Schonfeld <daniel@schonfeld.org>
|
||||
Danny Ben-David <dannybd@fb.com>
|
||||
Darcy <smadad@me.com>
|
||||
Daryl Lau <daryl@weak.io>
|
||||
Darío Javier Cravero <dario@uxtemple.com>
|
||||
Dave Galbraith <dave@jut.io>
|
||||
David Baker <djbaker2@gmail.com>
|
||||
David Ed Mellum <david@edmellum.com>
|
||||
David Goldberg <gberg1@users.noreply.github.com>
|
||||
David Granado <davidjgranado@gmail.com>
|
||||
David Greenspan <dgreenspan@alum.mit.edu>
|
||||
David Hellsing <david@aino.se>
|
||||
David Hu <davidhu91@gmail.com>
|
||||
David Khourshid <davidkpiano@gmail.com>
|
||||
David Mininger <dmininger@gmail.com>
|
||||
David Neubauer <davidneub@gmail.com>
|
||||
David Percy <davetp425@gmail.com>
|
||||
Dean Shi <dnshi@users.noreply.github.com>
|
||||
Denis Sokolov <denis@sokolov.cc>
|
||||
Deniss Jacenko <deniss.jacenko+github@gmail.com>
|
||||
Dennis Johnson <djohnson@rallydev.com>
|
||||
Devon Blandin <dblandin@gmail.com>
|
||||
Devon Harvey <devonharvey@gmail.com>
|
||||
Dmitrii Abramov <dmitrii@rheia.us>
|
||||
Dmitriy Rozhkov <dmitriy.rozhkov@xing.com>
|
||||
Dmitry Blues <dmitri.blyus@gmail.com>
|
||||
Dmitry Mazuro <dmitry.mazuro@icloud.com>
|
||||
Domenico Matteo <matteo.domenico@gmail.com>
|
||||
Don Abrams <donabrams@gmail.com>
|
||||
Dongsheng Liu <bellanchor@gmail.com>
|
||||
Dustan Kasten <dustan.kasten@gmail.com>
|
||||
Dustin Getz <dgetz@wingspan.com>
|
||||
Dylan Harrington <dylanharrington@gmail.com>
|
||||
Eduardo Garcia <emumaniacx@gmail.com>
|
||||
Edvin Erikson <edvin@rocketblast.com>
|
||||
Elaine Fang <elainefang@Elaines-MacBook-Pro.local>
|
||||
Enguerran <engcolson@gmail.com>
|
||||
Eric Clemmons <eric@smarterspam.com>
|
||||
Eric Eastwood <contact@ericeastwood.com>
|
||||
Eric Florenzano <floguy@gmail.com>
|
||||
Eric O'Connell <eric.oconnell@idealist.org>
|
||||
Eric Schoffstall <contra@wearefractal.com>
|
||||
Erik Harper <eharper@mixpo.com>
|
||||
Espen Hovlandsdal <rexxars@gmail.com>
|
||||
Evan Coonrod <evan@paloalto.com>
|
||||
Evan Vosberg <evanvosberg@urban.to>
|
||||
Fabio M. Costa <fabiomcosta@gmail.com>
|
||||
Federico Rampazzo <frampone@gmail.com>
|
||||
Felipe Oliveira Carvalho <felipekde@gmail.com>
|
||||
Felix Gnass <fgnass@gmail.com>
|
||||
Felix Kling <felix.kling@gmx.net>
|
||||
Fernando Correia <fernando@servicero.com>
|
||||
Frankie Bagnardi <f.bagnardi@gmail.com>
|
||||
François-Xavier Bois <fxbois@gmail.com>
|
||||
Fred Zhao <fredz@fb.com>
|
||||
Freddy Rangel <frederick.rangel@gmail.com>
|
||||
Fyodor Ivanishchev <cbrwizard@gmail.com>
|
||||
G Scott Olson <gscottolson@gmail.com>
|
||||
G. Kay Lee <balancetraveller+github@gmail.com>
|
||||
Gabe Levi <gabelevi@gmail.com>
|
||||
Gajus Kuizinas <g.kuizinas@anuary.com>
|
||||
Gareth Nicholson <gareth.nic@gmail.com>
|
||||
Garren Smith <garren.smith@gmail.com>
|
||||
Gavin McQuistin <gavin@kickfiredesign.com>
|
||||
Geert Pasteels <geert.pasteels@gmail.com>
|
||||
Geert-Jan Brits <gbrits@gmail.com>
|
||||
George A Sisco III <george.sisco@gmail.com>
|
||||
Georgii Dolzhykov <thorn.mailbox@gmail.com>
|
||||
Gilbert <gilbertbgarza@gmail.com>
|
||||
Glen Mailer <glenjamin@gmail.com>
|
||||
Grant Timmerman <granttimmerman@gmail.com>
|
||||
Greg Hurrell <glh@fb.com>
|
||||
Greg Perkins <gregrperkins@fb.com>
|
||||
Greg Roodt <groodt@gmail.com>
|
||||
Gregory <g.marcilhacy@gmail.com>
|
||||
Guangqiang Dong <gqdong@fb.com>
|
||||
Guido Bouman <m@guido.vc>
|
||||
Harry Hull <harry.hull1@gmail.com>
|
||||
Harry Marr <harry.marr@gmail.com>
|
||||
Harry Moreno <morenoh149@gmail.com>
|
||||
Harshad Sabne <harshadsabne@users.noreply.github.com>
|
||||
Hekar Khani <hekark@gmail.com>
|
||||
Hendrik Swanepoel <hendrik.swanepoel@gmail.com>
|
||||
Henrik Nyh <henrik@nyh.se>
|
||||
Henry Wong <henryw4k@gmail.com>
|
||||
Henry Zhu <hi@henryzoo.com>
|
||||
Hideo Matsumoto <hideo-m@pekeq.com>
|
||||
Hou Chia <kchia87@gmail.com>
|
||||
Huang-Wei Chang <chang.huangwei.01@gmail.com>
|
||||
Hugo Agbonon <hugo@agbonon.fr>
|
||||
Hugo Jobling <me@thisishugo.com>
|
||||
Hyeock Kwon <doublus@gmail.com>
|
||||
Héliton Nordt <hnordt@hnordt.com>
|
||||
Ian Obermiller <ian@obermillers.com>
|
||||
Ignacio Carbajo <icarbajop@gmail.com>
|
||||
Igor Scekic <igorscekic2@gmail.com>
|
||||
Ilia Pavlenkov <dortonway@gmail.com>
|
||||
Ilya Shuklin <ilya.shuklin@gmail.com>
|
||||
Ilyá Belsky <gelias.gbelsky@gmail.com>
|
||||
Ingvar Stepanyan <me@rreverser.com>
|
||||
Irae Carvalho <irae@irae.pro.br>
|
||||
Isaac Salier-Hellendag <isaac@fb.com>
|
||||
Iurii Kucherov <yuyokk@gmail.com>
|
||||
Ivan Kozik <ivan@ludios.org>
|
||||
Ivan Krechetov <ikr@ikr.su>
|
||||
Ivan Vergiliev <ivan.vergiliev@gmail.com>
|
||||
J. Andrew Brassington <jabbrass@zoho.com>
|
||||
J. Renée Beach <splendidnoise@gmail.com>
|
||||
JD Isaacks <jd@jisaacks.com>
|
||||
JJ Weber <jj.weber@gmail.com>
|
||||
JW <JW00000@gmail.com>
|
||||
Jack Zhang <jzhang31191@gmail.com>
|
||||
Jackie Wung <jacquelinewung@gmail.com>
|
||||
Jacob Gable <jacob.gable@gmail.com>
|
||||
Jacob Greenleaf <jake@imgur.com>
|
||||
Jae Hun Ro <jhr24@duke.edu>
|
||||
Jaeho Lee <me@jaeholee.org>
|
||||
Jaime Mingo <j.mingov@3boll.com>
|
||||
Jake Worth <jakeworth82@gmail.com>
|
||||
Jakub Malinowski <jakubmal@gmail.com>
|
||||
James <james@mystrata.com>
|
||||
James Brantly <james@jbrantly.com>
|
||||
James Burnett <jtburnett@tribune.com>
|
||||
James Friend <james@jsdf.co>
|
||||
James Ide <ide@fb.com>
|
||||
James Long <longster@gmail.com>
|
||||
James Pearce <jpearce@fb.com>
|
||||
James Seppi <james.seppi@gmail.com>
|
||||
James South <james_south@hotmail.com>
|
||||
James Wen <jrw2175@columbia.edu>
|
||||
Jamie Wong <jamie.lf.wong@gmail.com>
|
||||
Jamis Charles <jacharles@paypal.com>
|
||||
Jamison Dance <jergason@gmail.com>
|
||||
Jan Hancic <jan.hancic@gmail.com>
|
||||
Jan Kassens <jan@kassens.net>
|
||||
Jan Raasch <jan@janraasch.com>
|
||||
Jared Forsyth <jared@jaredforsyth.com>
|
||||
Jason <usaman2010us@gmail.com>
|
||||
Jason Bonta <jbonta@gmail.com>
|
||||
Jason Ly <jason.ly@gmail.com>
|
||||
Jason Miller <aidenn0@geocities.com>
|
||||
Jason Quense <monastic.panic@gmail.com>
|
||||
Jason Trill <jason@jasontrill.com>
|
||||
Jason Webster <jason@metalabdesign.com>
|
||||
Jay Jaeho Lee <jay@spoqa.com>
|
||||
Jean Lauliac <lauliacj@gmail.com>
|
||||
Jed Watson <jed.watson@me.com>
|
||||
Jeff Barczewski <jeff.barczewski@gmail.com>
|
||||
Jeff Carpenter <gcarpenterv@gmail.com>
|
||||
Jeff Chan <jefftchan@gmail.com>
|
||||
Jeff Hicken <jhicken@gmail.com>
|
||||
Jeff Kolesky <github@kolesky.com>
|
||||
Jeff Morrison <jeff@anafx.com>
|
||||
Jeff Welch <whatthejeff@gmail.com>
|
||||
Jeffrey Lin <lin.jeffrey@gmail.com>
|
||||
Jeremy Fairbank <elpapapollo@gmail.com>
|
||||
Jesse Skinner <jesse@thefutureoftheweb.com>
|
||||
Jignesh Kakadiya <jigneshhk1992@gmail.com>
|
||||
Jim OBrien <jimobrien930@gmail.com>
|
||||
Jim Sproch <jsproch@fb.com>
|
||||
Jimmy Jea <jimjea@gmail.com>
|
||||
Jing Chen <jingc@fb.com>
|
||||
Jinwoo Oh <arkist@gmail.com>
|
||||
Jinxiu Lee <lee.jinxiu@gmail.com>
|
||||
Jiyeon Seo <zzzeons@gmail.com>
|
||||
Jody McIntyre <scjody@modernduck.com>
|
||||
Joe Critchley <joecritch@gmail.com>
|
||||
Joe Stein <joeaarons@gmail.com>
|
||||
Joel Auterson <joel.auterson@googlemail.com>
|
||||
Johannes Baiter <johannes.baiter@gmail.com>
|
||||
Johannes Emerich <johannes@emerich.de>
|
||||
Johannes Lumpe <johannes@johanneslumpe.de>
|
||||
John Heroy <johnheroy@users.noreply.github.com>
|
||||
John Ryan <tjfryan@fb.com>
|
||||
John Watson <jwatson@fb.com>
|
||||
John-David Dalton <john.david.dalton@gmail.com>
|
||||
Jon Beebe <jon.beebe@daveramsey.com>
|
||||
Jon Chester <jonchester@fb.com>
|
||||
Jon Hester <jon.d.hester@gmail.com>
|
||||
Jon Madison <jon@tfftech.com>
|
||||
Jon Scott Clark <jonscottclark@gmail.com>
|
||||
Jon Tewksbury <jontewks@gmail.com>
|
||||
Jonas Enlund <jonas.enlund@gmail.com>
|
||||
Jonas Gebhardt <jonas@instagram.com>
|
||||
Jonathan Hsu <jhiswin@gmail.com>
|
||||
Jonathan Persson <persson.jonathan@gmail.com>
|
||||
Jordan Harband <ljharb@gmail.com>
|
||||
Jordan Walke <jordojw@gmail.com>
|
||||
Jorrit Schippers <jorrit@ncode.nl>
|
||||
Joseph Nudell <joenudell@gmail.com>
|
||||
Joseph Savona <joesavona@fb.com>
|
||||
Josh Bassett <josh.bassett@gmail.com>
|
||||
Josh Duck <josh@fb.com>
|
||||
Josh Perez <josh.perez@airbnb.com>
|
||||
Josh Yudaken <yud@instagram.com>
|
||||
Joshua Evans <joshua.evans@quantified.co>
|
||||
Joshua Go <joshuago@gmail.com>
|
||||
Joshua Goldberg <jsgoldberg90@gmail.com>
|
||||
Joshua Ma <me@joshma.com>
|
||||
João Valente <filipevalente@gmail.com>
|
||||
Juan Serrano <germ13@users.noreply.github.com>
|
||||
Julen Ruiz Aizpuru <julenx@gmail.com>
|
||||
Julian Viereck <julian.viereck@gmail.com>
|
||||
Julien Bordellier <git@julienbordellier.com>
|
||||
Julio Lopez <ljuliom@gmail.com>
|
||||
Jun Wu <quark@lihdd.net>
|
||||
Juraj Dudak <jdudak@fb.com>
|
||||
Justas Brazauskas <brazauskasjustas@gmail.com>
|
||||
Justin Jaffray <justinjaffray@khanacademy.org>
|
||||
Justin Robison <jrobison151@gmail.com>
|
||||
Justin Woo <moomoowoo@gmail.com>
|
||||
Kale <krydrogen@gmail.com>
|
||||
Kamron Batman <kamronbatman@users.noreply.github.com>
|
||||
Karl Mikkelsen <karl@kingkarl.com>
|
||||
Karpich Dmitry <karpich@gollard.ru>
|
||||
Keito Uchiyama <projects@keito.me>
|
||||
Ken Powers <ken@kenpowers.net>
|
||||
Kent C. Dodds <kent@doddsfamily.us>
|
||||
Kevin Cheng <09chengk@gmail.com>
|
||||
Kevin Coughlin <kevintcoughlin@gmail.com>
|
||||
Kevin Huang <huang.kev@gmail.com>
|
||||
Kevin Lau <thekevlau@gmail.com>
|
||||
Kevin Old <kevin@kevinold.com>
|
||||
Kevin Robinson <krobinson@twitter.com>
|
||||
Kewei Jiang <jkewei328@hotmail.com>
|
||||
Kier Borromeo <seraphipod@gmail.com>
|
||||
KimCoding <jeokrang@hanmail.net>
|
||||
Kirk Steven Hansen <hanski07@kirk-hansens-macbook.local>
|
||||
Kit Randel <kit@nocturne.net.nz>
|
||||
Kohei TAKATA <kt.koheitakata@gmail.com>
|
||||
Koo Youngmin <youngmin@youngminz.kr>
|
||||
Krystian Karczewski <karcz.k@gmail.com>
|
||||
Kunal Mehta <k.mehta@berkeley.edu>
|
||||
Kurt Ruppel <me@kurtruppel.com>
|
||||
Kyle Kelley <rgbkrk@gmail.com>
|
||||
Kyle Mathews <mathews.kyle@gmail.com>
|
||||
Laurence Rowe <l@lrowe.co.uk>
|
||||
Laurent Etiemble <laurent.etiemble@monobjc.net>
|
||||
Lee Byron <lee@leebyron.com>
|
||||
Lee Jaeyoung <jaeyoung@monodiary.net>
|
||||
Lei <tendant@gmail.com>
|
||||
Leland Richardson <leland.m.richardson@gmail.com>
|
||||
Leon Fedotov <LeonFedotov@users.noreply.github.com>
|
||||
Leon Yip <lyip1992@users.noreply.github.com>
|
||||
Leonardo YongUk Kim <dalinaum@gmail.com>
|
||||
Levi Buzolic <levibuzolic@gmail.com>
|
||||
Levi McCallum <levi@levimccallum.com>
|
||||
Lily <qvang.j@gmail.com>
|
||||
Logan Allen <loganfynne@gmail.com>
|
||||
Lovisa Svallingson <lovisasvallingson@gmail.com>
|
||||
Ludovico Fischer <livrerie@gmail.com>
|
||||
Luigy Leon <luichi.19@gmail.com>
|
||||
Luke Horvat <lukehorvat@gmail.com>
|
||||
MIKAMI Yoshiyuki <yoshuki@saikyoline.jp>
|
||||
Maher Beg <maherbeg@gmail.com>
|
||||
Manas <prometheansacrifice@gmail.com>
|
||||
Marcin K. <katzoo@github.mail>
|
||||
Marcin Kwiatkowski <marcin.kwiatkowski@hotmail.com>
|
||||
Marcin Szczepanski <marcins@gmail.com>
|
||||
Mariano Desanze <protronm@gmail.com>
|
||||
Marjan <marjan.georgiev@gmail.com>
|
||||
Mark Anderson <undernewmanagement@users.noreply.github.com>
|
||||
Mark Funk <mfunk86@gmail.com>
|
||||
Mark Funk <mark@boomtownroi.com>
|
||||
Mark Hintz <markohintz@gmail.com>
|
||||
Mark IJbema <markijbema@gmail.com>
|
||||
Mark Murphy <murphy.mark@live.ca>
|
||||
Mark Richardson <echo@fb.com>
|
||||
Mark Rushakoff <mark@influxdb.com>
|
||||
Mark Sun <sunmark14@gmail.com>
|
||||
Marlon Landaverde <milanlandaverde@gmail.com>
|
||||
Marshall Roch <mroch@fb.com>
|
||||
Martin Andert <mandert@gmail.com>
|
||||
Martin Hujer <mhujer@gmail.com>
|
||||
Martin Jul <martin@mjul.com>
|
||||
Martin Konicek <mkonicek@fb.com>
|
||||
Martin Mihaylov <martomi@users.noreply.github.com>
|
||||
Masaki KOBAYASHI <makky.4d6b.3f5@gmail.com>
|
||||
Mathieu M-Gosselin <mathieumg@gmail.com>
|
||||
Mathieu Savy <savy.mathieu@gmail.com>
|
||||
Matias Singers <mail@matiassingers.com>
|
||||
Matsunoki <himkt@klis.tsukuba.ac.jp>
|
||||
Matt Brookes <matt@brookes.net>
|
||||
Matt Dunn-Rankin <mdunnrankin@gmail.com>
|
||||
Matt Harrison <mt.harrison86@gmail.com>
|
||||
Matt Huggins <matt.huggins@gmail.com>
|
||||
Matt Stow <matt.stow@foxsports.com.au>
|
||||
Matt Zabriskie <mzabriskie@gmail.com>
|
||||
Matthew Dapena-Tretter <m@tthewwithanm.com>
|
||||
Matthew Herbst <mherbst@chegg.com>
|
||||
Matthew Hodgson <matthew@matrix.org>
|
||||
Matthew Johnston <matthewjohnston4@outlook.com>
|
||||
Matthew King <mking@users.noreply.github.com>
|
||||
Matthew Looi <looi.matthew@gmail.com>
|
||||
Matthew Miner <matthew@matthewminer.com>
|
||||
Matthias Le Brun <mlbli@me.com>
|
||||
Matthew Johnston <matthewjohnston4@users.noreply.github.com>
|
||||
Matti Nelimarkka <matti.nelimarkka@hiit.fi>
|
||||
Mattijs Kneppers <mattijs@arttech.nl>
|
||||
Max F. Albrecht <1@178.is>
|
||||
Max Heiber <max.heiber@gmail.com>
|
||||
Max Stoiber <contact@mstoiber.com>
|
||||
Maxi Ferreira <charca@gmail.com>
|
||||
Maxim Abramchuk <MaximAbramchuck@gmail.com>
|
||||
Merrick Christensen <merrick.christensen@gmail.com>
|
||||
Mert Kahyaoğlu <mertkahyaoglu93@gmail.com>
|
||||
Michael Chan <mijoch@gmail.com>
|
||||
Michael McDermott <michael@mgmcdermott.com>
|
||||
Michael Randers-Pehrson <michael.rp@gmail.com>
|
||||
Michael Ridgway <mridgway@yahoo-inc.com>
|
||||
Michael Warner <MichaelJWarner@hotmail.com>
|
||||
Michael Wiencek <mwtuea@gmail.com>
|
||||
Michael Ziwisky <mikezx@gmail.com>
|
||||
Michal Srb <xixixao@seznam.cz>
|
||||
Michelle Todd <himichelletodd@gmail.com>
|
||||
Mihai Parparita <mihai.parparita@gmail.com>
|
||||
Mike D Pilsbury <mike.pilsbury@gmail.com>
|
||||
Mike Groseclose <mike.groseclose@gmail.com>
|
||||
Mike Nordick <mnordick>
|
||||
Mikolaj Dadela <mikolaj.dadela@hgv-online.de>
|
||||
Miles Johnson <mileswjohnson@gmail.com>
|
||||
Minwe LUO <minwe@yunshipei.com>
|
||||
Miorel Palii <miorel@fb.com>
|
||||
Morhaus <alexandre.kirszenberg@gmail.com>
|
||||
Moshe Kolodny <kolodny.github@gmail.com>
|
||||
Mouad Debbar <mdebbar@fb.com>
|
||||
Murad <rogozhnikoff@users.noreply.github.com>
|
||||
Murray M. Moss <murray@mmoss.name>
|
||||
Nadeesha Cabral <nadeesha.cabral@gmail.com>
|
||||
Naman Goel <naman34@gmail.com>
|
||||
Nate Hunzaker <nate.hunzaker@gmail.com>
|
||||
Nate Lee <nathaniel.jy.lee88@gmail.com>
|
||||
Nathan Smith <NogsMPLS@users.noreply.github.com>
|
||||
Nathan White <nw@nwhite.net>
|
||||
Nee <944316342@qq.com>
|
||||
Neri Marschik <marschik_neri@cyberagent.co.jp>
|
||||
Nguyen Truong Duy <truongduy134@yahoo.com>
|
||||
Nicholas Bergson-Shilcock <me@nicholasbs.net>
|
||||
Nicholas Clawson <nickclaw@users.noreply.github.com>
|
||||
Nick Balestra <nickbalestra@users.noreply.github.com>
|
||||
Nick Fitzgerald <fitzgen@gmail.com>
|
||||
Nick Gavalas <njg57@cornell.edu>
|
||||
Nick Merwin <nick@lemurheavy.com>
|
||||
Nick Presta <nick@nickpresta.ca>
|
||||
Nick Raienko <enaqxx@gmail.com>
|
||||
Nick Thompson <ncthom91@gmail.com>
|
||||
Nick Williams <WickyNilliams@users.noreply.github.com>
|
||||
Niklas Boström <nbostrom@gmail.com>
|
||||
Ning Xia <ning-github@users.noreply.github.com>
|
||||
Niole Nelson <niolenelson@gmail.com>
|
||||
Oiva Eskola <oiva.eskola@gmail.com>
|
||||
Oleg <o.yanchinskiy@gmail.com>
|
||||
Oleksii Markhovskyi <olexiy.markhovsky@gmail.com>
|
||||
Oliver Zeigermann <oliver.zeigermann@gmail.com>
|
||||
Olivier Tassinari <Olivier.tassinari@gmail.com>
|
||||
Owen Coutts <owenc@fb.com>
|
||||
Pablo Lacerda de Miranda <pablolm@yahoo-inc.com>
|
||||
Paolo Moretti <moretti@users.noreply.github.com>
|
||||
Pascal Hartig <passy@twitter.com>
|
||||
Patrick <info@telepark.de>
|
||||
Patrick Laughlin <patrick@laughl.info>
|
||||
Patrick Stapleton <github@gdi2290.com>
|
||||
Paul Benigeri <me@benigeri.com>
|
||||
Paul Harper <benekastah@gmail.com>
|
||||
Paul O’Shannessy <paul@oshannessy.com>
|
||||
Paul Seiffert <paul.seiffert@gmail.com>
|
||||
Paul Shen <paul@mnml0.com>
|
||||
@@ -511,186 +257,87 @@ Pete Hunt <floydophone@gmail.com>
|
||||
Peter Blazejewicz <peter.blazejewicz@gmail.com>
|
||||
Peter Cottle <pcottle@fb.com>
|
||||
Peter Jaros <peter.a.jaros@gmail.com>
|
||||
Peter Newnham <peter.newnham@appsbroker.com>
|
||||
Petri Lehtinen <petri@digip.org>
|
||||
Petri Lievonen <plievone@cc.hut.fi>
|
||||
Pieter Vanderwerff <me@pieter.io>
|
||||
Pouja Nikray <poujanik@gmail.com>
|
||||
Prathamesh Sonpatki <csonpatki@gmail.com>
|
||||
Prayag Verma <prayag.verma@gmail.com>
|
||||
Preston Parry <ClimbsRocks@users.noreply.github.com>
|
||||
Rafael <rafael.garcia@clever.com>
|
||||
Rafal Dittwald <rafal.dittwald@gmail.com>
|
||||
Rainer Oviir <roviir@gmail.com>
|
||||
Rajat Sehgal <rajatsehgal1988@gmail.com>
|
||||
Rajiv Tirumalareddy <rajivtreddy@gmail.com>
|
||||
Ram Kaniyur <quadrupleslap@users.noreply.github.com>
|
||||
Randall Randall <randall@randallsquared.com>
|
||||
Ray <ray@tomo.im>
|
||||
Raymond Ha <raymond@shraymonks.com>
|
||||
Reed Loden <reed@reedloden.com>
|
||||
Remko Tronçon <git@el-tramo.be>
|
||||
Richard D. Worth <rdworth@gmail.com>
|
||||
Richard Feldman <richard.t.feldman@gmail.com>
|
||||
Richard Kho <hello@richardkho.com>
|
||||
Richard Littauer <richard.littauer@gmail.com>
|
||||
Richard Livesey <Livesey7@hotmail.co.uk>
|
||||
Richard Wood <rwoodnz@gmail.com>
|
||||
Rick Beerendonk <rick@beerendonk.com>
|
||||
Rick Ford <rickfordrick@gmail.com>
|
||||
Riley Tomasek <riley.tomasek@gmail.com>
|
||||
Rob Arnold <robarnold@cs.cmu.edu>
|
||||
Robert Binna <rbinna@gmail.com>
|
||||
Robert Knight <robert.knight@mendeley.com>
|
||||
Robert Sedovsek <robert.sedovsek@gmail.com>
|
||||
Robin Berjon <robin@berjon.com>
|
||||
Robin Frischmann <robin@rofrischmann.de>
|
||||
Roman Pominov <rpominov+github@gmail.com>
|
||||
Roman Vanesyan <roman.vanesyan@gmail.com>
|
||||
Russ <russwirtz@gmail.com>
|
||||
Ryan Seddon <seddon.ryan@gmail.com>
|
||||
Sahat Yalkabov <sakhat@gmail.com>
|
||||
Saif Hakim <saif@benchling.com>
|
||||
Saiichi Hashimoto <saiichihashimoto@gmail.com>
|
||||
Sam Beveridge <sbeveridge@saltstack.com>
|
||||
Sam Saccone <samccone@gmail.com>
|
||||
Sam Selikoff <sam.selikoff@gmail.com>
|
||||
Samy Al Zahrani <samy@sadeem.net>
|
||||
Sander Spies <sandermail@gmail.com>
|
||||
Scott Burch <scott@bulldoginfo.com>
|
||||
Scott Feeney <scott@oceanbase.org>
|
||||
Sean Kinsey <oyvind@fb.com>
|
||||
Sebastian Markbåge <sebastian@calyptus.eu>
|
||||
Sebastian McKenzie <sebmck@gmail.com>
|
||||
Seoh Char <devthewild@gmail.com>
|
||||
Sercan Eraslan <sercan.eraslan@sahibinden.com>
|
||||
Serg <undrdog@yandex.ru>
|
||||
Sergey Generalov <sergey@genbit.ru>
|
||||
Sergey Rubanov <chi187@gmail.com>
|
||||
Seyi Adebajo <hello@seyinanigans.com>
|
||||
Shane O'Sullivan <shaneosullivan1@gmail.com>
|
||||
Shaun Trennery <shaun.trennery@gmail.com>
|
||||
Sheraz <undernewmanagement@users.noreply.github.com>
|
||||
ShihChi Huang <hhuang@netflix.com>
|
||||
Shim Won <marocchino@gmail.com>
|
||||
Shinnosuke Watanabe <snnskwtnb@gmail.com>
|
||||
Shogun Sea <shogunsea08@gmail.com>
|
||||
Shota Kubota <kubosho@users.noreply.github.com>
|
||||
Shripad K <assortmentofsorts@gmail.com>
|
||||
Sibi <psibi2000@gmail.com>
|
||||
Simen Bekkhus <sbekkhus91@gmail.com>
|
||||
Simon Højberg <r.hackr@gmail.com>
|
||||
Simon Welsh <simon@simon.geek.nz>
|
||||
Simone Vittori <hello@simonewebdesign.it>
|
||||
Soichiro Kawamura <mail@w-st.com>
|
||||
Sophia Westwood <sophia@quip.com>
|
||||
Sota Ohara <ohrst.18@gmail.com>
|
||||
Spencer Handley <spencerhandley@gmail.com>
|
||||
Stefan Dombrowski <sdo451@gmail.com>
|
||||
Stephen Murphy <smurphy3@apple.com>
|
||||
Sterling Cobb <sterlingcobb@gmail.com>
|
||||
Steve Baker <_steve_@outlook.com>
|
||||
Steven Luscher <react@steveluscher.com>
|
||||
Steven Vachon <contact@svachon.com>
|
||||
Stoyan Stefanov <ssttoo@ymail.com>
|
||||
Sundeep Malladi <sundeep.malladi@gmail.com>
|
||||
Sunny Juneja <me@sunnyjuneja.com>
|
||||
Sven Helmberger <fforw@gmx.de>
|
||||
Sverre Johansen <sverre.johansen@gmail.com>
|
||||
Sébastien Lorber <lorber.sebastien@gmail.com>
|
||||
Sławomir Laskowski <laskowski.box@gmail.com>
|
||||
Taeho Kim <dittos@gmail.com>
|
||||
Tay Yang Shun <tay.yang.shun@gmail.com>
|
||||
Ted Kim <ted@vcnc.co.kr>
|
||||
Tengfei Guo <terryr3rd@yeah.net>
|
||||
Teodor Szente <teodor98sz@gmail.com>
|
||||
Thomas Aylott <oblivious@subtlegradient.com>
|
||||
Thomas Boyt <thomas.boyt@venmo.com>
|
||||
Thomas Broadley <buriedunderbooks@hotmail.com>
|
||||
Thomas Reggi <socialtr@gmail.com>
|
||||
Thomas Röggla <t.roggla@cwi.nl>
|
||||
Thomas Shaddox <thomas@heyzap.com>
|
||||
Thomas Shafer <thomasjshafer@gmail.com>
|
||||
ThomasCrvsr <crevoisier.thomas@gmail.com>
|
||||
Tienchai Wirojsaksaree <tienchai@fb.com>
|
||||
Tim Routowicz <troutowicz@gmail.com>
|
||||
Tim Schaub <tschaub@users.noreply.github.com>
|
||||
Timothy Yung <yungsters@gmail.com>
|
||||
Timur Carpeev <timuric@users.noreply.github.com>
|
||||
Tobias Reiss <tag+github@basecode.de>
|
||||
Tom Duncalf <tom@tomduncalf.com>
|
||||
Tom Haggie <thaggie@gmail.com>
|
||||
Tom Hauburger <thauburger@gmail.com>
|
||||
Tom MacWright <tom@macwright.org>
|
||||
Tom Occhino <tomocchino@gmail.com>
|
||||
Tomasz Kołodziejski <tkolodziejski@gmail.com>
|
||||
Tomoya Suzuki <tmysz.dev@gmail.com>
|
||||
Tony Spiro <tspiro@tonyspiro.com>
|
||||
Toru Kobayashi <koba0004@gmail.com>
|
||||
Trinh Hoang Nhu <trinhhoangnhu@gmail.com>
|
||||
Tsung Hung <thung@me.com>
|
||||
Tyler Brock <tyler.brock@gmail.com>
|
||||
Ustin Zarubin <ustin.zarubin@campusbellhops.com>
|
||||
Vadim Chernysh <chernysh.vadim@gmail.com>
|
||||
Varun Rau <varunrau@gmail.com>
|
||||
Vasiliy Loginevskiy <Yeti.or@gmail.com>
|
||||
Victor Alvarez <v.alvarez312@gmail.com>
|
||||
Victor Homyakov <vkhomyackov@gmail.com>
|
||||
Victor Koenders <victor.koenders@gmail.com>
|
||||
Ville Immonen <ville.immonen@iki.fi>
|
||||
Vincent Riemer <vincentriemer@gmail.com>
|
||||
Vincent Siao <vincent@asana.com>
|
||||
Vipul A M <vipulnsward@gmail.com>
|
||||
Vitaly Kramskikh <vkramskikh@gmail.com>
|
||||
Vitor Balocco <vitorbal@gmail.com>
|
||||
Vjeux <vjeuxx@gmail.com>
|
||||
Volkan Unsal <spocksplanet@gmail.com>
|
||||
Wander Wang <wander.wang@ismole.com>
|
||||
Wayne Larsen <wayne@larsen.st>
|
||||
WickyNilliams <WickyNilliams@MBA>
|
||||
Wincent Colaiuta <win@wincent.com>
|
||||
Wout Mertens <Wout.Mertens@gmail.com>
|
||||
Xavier Morel <xmo-odoo@users.noreply.github.com>
|
||||
XuefengWu <benewu@gmail.com>
|
||||
Yakov Dalinchuk <murashki@users.noreply.github.com>
|
||||
Yasar icli <hello@yasaricli.com>
|
||||
YouBao Nong <noyobo@gmail.com>
|
||||
Yuichi Hagio <yhagio87@gmail.com>
|
||||
Yuriy Dybskiy <yuriy@dybskiy.com>
|
||||
Yutaka Nakajima <nakazye@gmail.com>
|
||||
Yuval Dekel <thedekel@fb.com>
|
||||
Zach Bruggeman <mail@bruggie.com>
|
||||
Zach Ramaekers <zramaekers@gmail.com>
|
||||
Zacharias <zachasme@users.noreply.github.com>
|
||||
Zeke Sikelianos <zeke@sikelianos.com>
|
||||
Zhangjd <zhang.jd@qq.com>
|
||||
adraeth <jerzy.mirecki@gmail.com>
|
||||
arush <arush@ilovebrands.net>
|
||||
brafdlog <brafdlog@gmail.com>
|
||||
chen <kikyous@163.com>
|
||||
clariroid <clarinette.uranus@gmail.com>
|
||||
claudiopro <claudio.procida@gmail.com>
|
||||
cutbko <kutsenko.eugene@hotmail.com>
|
||||
davidxi <davidgraycn@gmail.com>
|
||||
dongmeng.ldm <dongmeng.ldm@alibaba-inc.com>
|
||||
iamchenxin <iamchenxin@gmail.com>
|
||||
iamdoron <doronpagot@gmail.com>
|
||||
iawia002 <z2d@jifangcheng.com>
|
||||
imagentleman <imagentlemail@gmail.com>
|
||||
koh-taka <koh-taka@users.noreply.github.com>
|
||||
kohashi85 <hako584@gmail.com>
|
||||
laiso <laiso@lai.so>
|
||||
leeyoungalias <leeyoungalias@qq.com>
|
||||
li.li <li.li@ele.me>
|
||||
maxprafferty <maxprafferty@gmail.com>
|
||||
rgarifullin <ringarifullin@gmail.com>
|
||||
songawee <dennis@songawee.com>
|
||||
sugarshin <shinsugar@gmail.com>
|
||||
wali-s <ahmad3y2k@hotmail.com>
|
||||
yiminghe <yiminghe@gmail.com>
|
||||
youmoo <youmoolee@gmail.com>
|
||||
zhangjg <jinguozhang@qq.com>
|
||||
zwhitchcox <zwhitchcox@gmail.com>
|
||||
Árni Hermann Reynisson <arnihr@gmail.com>
|
||||
元彦 <yuanyan@users.noreply.github.com>
|
||||
凌恒 <jiakun.dujk@alibaba-inc.com>
|
||||
张敏 <cookfront@gmail.com>
|
||||
|
||||
560
CHANGELOG.md
560
CHANGELOG.md
@@ -1,531 +1,3 @@
|
||||
## 15.4.2 (January 6, 2017)
|
||||
|
||||
### React
|
||||
|
||||
* Fixed build issues with the Brunch bundler. ([@gaearon](https://github.com/gaearon) in [#8686](https://github.com/facebook/react/pull/8686))
|
||||
* Improved error messages for invalid element types. ([@spicyj](https://github.com/spicyj) in [#8612](https://github.com/facebook/react/pull/8612))
|
||||
* Removed a warning about `getInitialState` when `this.state` is set. ([@bvaughn](https://github.com/bvaughn) in [#8594](https://github.com/facebook/react/pull/8594))
|
||||
* Removed some dead code. ([@diegomura](https://github.com/diegomura) in [#8050](https://github.com/facebook/react/pull/8050), [@dfrownfelter](https://github.com/dfrownfelter) in [#8597](https://github.com/facebook/react/pull/8597))
|
||||
|
||||
### React DOM
|
||||
|
||||
* Fixed a decimal point issue on uncontrolled number inputs. ([@nhunzaker](https://github.com/nhunzaker) in [#7750](https://github.com/facebook/react/pull/7750))
|
||||
* Fixed rendering of textarea placeholder in IE11. ([@aweary](https://github.com/aweary) in [#8020](https://github.com/facebook/react/pull/8020))
|
||||
* Worked around a script engine bug in IE9. ([@eoin](https://github.com/eoin) in [#8018](https://github.com/facebook/react/pull/8018))
|
||||
|
||||
### React Addons
|
||||
|
||||
* Fixed build issues in RequireJS and SystemJS environments. ([@gaearon](https://github.com/gaearon) in [#8686](https://github.com/facebook/react/pull/8686))
|
||||
* Added missing package dependencies. ([@kweiberth](https://github.com/kweiberth) in [#8467](https://github.com/facebook/react/pull/8467))
|
||||
|
||||
## 15.4.1 (November 22, 2016)
|
||||
|
||||
### React
|
||||
* Restructure variable assignment to work around a Rollup bug ([@gaearon](https://github.com/gaearon) in [#8384](https://github.com/facebook/react/pull/8384))
|
||||
|
||||
### React DOM
|
||||
* Fixed event handling on disabled button elements ([@spicyj](https://github.com/spicyj) in [#8387](https://github.com/facebook/react/pull/8387))
|
||||
* Fixed compatibility of browser build with AMD environments ([@zpao](https://github.com/zpao) in [#8374](https://github.com/facebook/react/pull/8374))
|
||||
|
||||
## 15.4.0 (November 16, 2016)
|
||||
|
||||
### React
|
||||
* React package and browser build no longer "secretly" includes React DOM. ([@sebmarkbage](https://github.com/sebmarkbage) in [#7164](https://github.com/facebook/react/pull/7164) and [#7168](https://github.com/facebook/react/pull/7168))
|
||||
* Required PropTypes now fail with specific messages for null and undefined. ([@chenglou](https://github.com/chenglou) in [#7291](https://github.com/facebook/react/pull/7291))
|
||||
* Improved development performance by freezing children instead of copying. ([@keyanzhang](https://github.com/keyanzhang) in [#7455](https://github.com/facebook/react/pull/7455))
|
||||
|
||||
### React DOM
|
||||
* Fixed occasional test failures when React DOM is used together with shallow renderer. ([@goatslacker](https://github.com/goatslacker) in [#8097](https://github.com/facebook/react/pull/8097))
|
||||
* Added a warning for invalid `aria-` attributes. ([@jessebeach](https://github.com/jessebeach) in [#7744](https://github.com/facebook/react/pull/7744))
|
||||
* Added a warning for using `autofocus` rather than `autoFocus`. ([@hkal](https://github.com/hkal) in [#7694](https://github.com/facebook/react/pull/7694))
|
||||
* Removed an unnecessary warning about polyfilling `String.prototype.split`. ([@nhunzaker](https://github.com/nhunzaker) in [#7629](https://github.com/facebook/react/pull/7629))
|
||||
* Clarified the warning about not calling PropTypes manually. ([@jedwards1211](https://github.com/jedwards1211) in [#7777](https://github.com/facebook/react/pull/7777))
|
||||
* The unstable `batchedUpdates` API now passes the wrapped function's return value through. ([@bgnorlov](https://github.com/bgnorlov) in [#7444](https://github.com/facebook/react/pull/7444))
|
||||
* Fixed a bug with updating text in IE 8. ([@mnpenner](https://github.com/mnpenner) in [#7832](https://github.com/facebook/react/pull/7832))
|
||||
|
||||
### React Perf
|
||||
* When ReactPerf is started, you can now view the relative time spent in components as a chart in Chrome Timeline. ([@gaearon](https://github.com/gaearon) in [#7549](https://github.com/facebook/react/pull/7549))
|
||||
|
||||
### React Test Utils
|
||||
* If you call `Simulate.click()` on a `<input disabled onClick={foo} />` then `foo` will get called whereas it didn't before. ([@nhunzaker](https://github.com/nhunzaker) in [#7642](https://github.com/facebook/react/pull/7642))
|
||||
|
||||
### React Test Renderer
|
||||
* Due to packaging changes, it no longer crashes when imported together with React DOM in the same file. ([@sebmarkbage](https://github.com/sebmarkbage) in [#7164](https://github.com/facebook/react/pull/7164) and [#7168](https://github.com/facebook/react/pull/7168))
|
||||
* `ReactTestRenderer.create()` now accepts `{createNodeMock: element => mock}` as an optional argument so you can mock refs with snapshot testing. ([@Aweary](https://github.com/Aweary) in [#7649](https://github.com/facebook/react/pull/7649), [#8261](https://github.com/facebook/react/pull/8261))
|
||||
|
||||
|
||||
## 15.3.2 (September 19, 2016)
|
||||
|
||||
### React
|
||||
- Remove plain object warning from React.createElement & React.cloneElement. ([@spudly](https://github.com/spudly) in [#7724](https://github.com/facebook/react/pull/7724))
|
||||
|
||||
### React DOM
|
||||
- Add `playsInline` to supported HTML attributes. ([@reaperhulk](https://github.com/reaperhulk) in [#7519](https://github.com/facebook/react/pull/7519))
|
||||
- Add `as` to supported HTML attributes. ([@kevinslin](https://github.com/kevinslin) in [#7582](https://github.com/facebook/react/pull/7582))
|
||||
- Improve DOM nesting validation warning about whitespace. ([@spicyj](https://github.com/spicyj) in [#7515](https://github.com/facebook/react/pull/7515))
|
||||
- Avoid "Member not found" exception in IE10 when calling `preventDefault()` in Synthetic Events. ([@g-palmer](https://github.com/g-palmer) in [#7411](https://github.com/facebook/react/pull/7411))
|
||||
- Fix memory leak in `onSelect` implementation. ([@AgtLucas](https://github.com/AgtLucas) in [#7533](https://github.com/facebook/react/pull/7533))
|
||||
- Improve robustness of `document.documentMode` checks to handle Google Tag Manager. ([@SchleyB](https://github.com/SchleyB) in [#7594](https://github.com/facebook/react/pull/7594))
|
||||
- Add more cases to controlled inputs warning. ([@marcin-mazurek](https://github.com/marcin-mazurek) in [#7544](https://github.com/facebook/react/pull/7544))
|
||||
- Handle case of popup blockers overriding `document.createEvent`. ([@Andarist](https://github.com/Andarist) in [#7621](https://github.com/facebook/react/pull/7621))
|
||||
- Fix issue with `dangerouslySetInnerHTML` and SVG in Internet Explorer. ([@zpao](https://github.com/zpao) in [#7618](https://github.com/facebook/react/pull/7618))
|
||||
- Improve handling of Japanese IME on Internet Explorer. ([@msmania](https://github.com/msmania) in [#7107](https://github.com/facebook/react/pull/7107))
|
||||
|
||||
### React Test Renderer
|
||||
- Support error boundaries. ([@millermedeiros](https://github.com/millermedeiros) in [#7558](https://github.com/facebook/react/pull/7558), [#7569](https://github.com/facebook/react/pull/7569), [#7619](https://github.com/facebook/react/pull/7619))
|
||||
- Skip null ref warning. ([@Aweary](https://github.com/Aweary) in [#7658](https://github.com/facebook/react/pull/7658))
|
||||
|
||||
### React Perf Add-on
|
||||
- Ensure lifecycle timers are stopped on errors. ([@gaearon](https://github.com/gaearon) in [#7548](https://github.com/facebook/react/pull/7548))
|
||||
|
||||
|
||||
## 15.3.1 (August 19, 2016)
|
||||
|
||||
### React
|
||||
|
||||
- Improve performance of development builds in various ways. ([@gaearon](https://github.com/gaearon) in [#7461](https://github.com/facebook/react/pull/7461), [#7463](https://github.com/facebook/react/pull/7463), [#7483](https://github.com/facebook/react/pull/7483), [#7488](https://github.com/facebook/react/pull/7488), [#7491](https://github.com/facebook/react/pull/7491), [#7510](https://github.com/facebook/react/pull/7510))
|
||||
- Cleanup internal hooks to improve performance of development builds. ([@gaearon](https://github.com/gaearon) in [#7464](https://github.com/facebook/react/pull/7464), [#7472](https://github.com/facebook/react/pull/7472), [#7481](https://github.com/facebook/react/pull/7481), [#7496](https://github.com/facebook/react/pull/7496))
|
||||
- Upgrade fbjs to pick up another performance improvement from [@gaearon](https://github.com/gaearon) for development builds. ([@zpao](https://github.com/zpao) in [#7532](https://github.com/facebook/react/pull/7532))
|
||||
- Improve startup time of React in Node. ([@zertosh](https://github.com/zertosh) in [#7493](https://github.com/facebook/react/pull/7493))
|
||||
- Improve error message of `React.Children.only`. ([@spicyj](https://github.com/spicyj) in [#7514](https://github.com/facebook/react/pull/7514))
|
||||
|
||||
### React DOM
|
||||
- Avoid `<input>` validation warning from browsers when changing `type`. ([@nhunzaker](https://github.com/nhunzaker) in [#7333](https://github.com/facebook/react/pull/7333))
|
||||
- Avoid "Member not found" exception in IE10 when calling `stopPropagation()` in Synthetic Events. ([@nhunzaker](https://github.com/nhunzaker) in [#7343](https://github.com/facebook/react/pull/7343))
|
||||
- Fix issue resulting in inability to update some `<input>` elements in mobile browsers. ([@keyanzhang](https://github.com/keyanzhang) in [#7397](https://github.com/facebook/react/pull/7397))
|
||||
- Fix memory leak in server rendering. ([@keyanzhang](https://github.com/keyanzhang) in [#7410](https://github.com/facebook/react/pull/7410))
|
||||
- Fix issue resulting in `<input type="range">` values not updating when changing `min` or `max`. ([@troydemonbreun](https://github.com/troydemonbreun) in [#7486](https://github.com/facebook/react/pull/7486))
|
||||
- Add new warning for rare case of attempting to unmount a container owned by a different copy of React. ([@ventuno](https://github.com/ventuno) in [#7456](https://github.com/facebook/react/pull/7456))
|
||||
|
||||
### React Test Renderer
|
||||
- Fix ReactTestInstance::toJSON() with empty top-level components. ([@Morhaus](https://github.com/Morhaus) in [#7523](https://github.com/facebook/react/pull/7523))
|
||||
|
||||
### React Native Renderer
|
||||
- Change `trackedTouchCount` invariant into a console.error for better reliability. ([@yungsters](https://github.com/yungsters) in [#7400](https://github.com/facebook/react/pull/7400))
|
||||
|
||||
|
||||
## 15.3.0 (July 29, 2016)
|
||||
|
||||
### React
|
||||
- Add `React.PureComponent` - a new base class to extend, replacing `react-addons-pure-render-mixin` now that mixins don't work with ES2015 classes. ([@spicyj](https://github.com/spicyj) in [#7195](https://github.com/facebook/react/pull/7195))
|
||||
- Add new warning when modifying `this.props.children`. ([@jimfb](https://github.com/jimfb) in [#7001](https://github.com/facebook/react/pull/7001))
|
||||
- Fixed issue with ref resolution order. ([@gaearon](https://github.com/gaearon) in [#7101](https://github.com/facebook/react/pull/7101))
|
||||
- Warn when mixin is undefined. ([@swaroopsm](https://github.com/swaroopsm) in [#6158](https://github.com/facebook/react/pull/6158))
|
||||
- Downgrade "unexpected batch number" invariant to a warning. ([@spicyj](https://github.com/spicyj) in [#7133](https://github.com/facebook/react/pull/7133))
|
||||
- Validate arguments to `oneOf` and `oneOfType` PropTypes sooner. ([@troydemonbreun](https://github.com/troydemonbreun) in [#6316](https://github.com/facebook/react/pull/6316))
|
||||
- Warn when calling PropTypes directly. ([@Aweary](https://github.com/Aweary) in [#7132](https://github.com/facebook/react/pull/7132), [#7194](https://github.com/facebook/react/pull/7194))
|
||||
- Improve warning when using Maps as children. ([@keyanzhang](https://github.com/keyanzhang) in [#7260](https://github.com/facebook/react/pull/7260))
|
||||
- Add additional type information to the `PropTypes.element` warning. ([@alexzherdev](https://github.com/alexzherdev) in [#7319](https://github.com/facebook/react/pull/7319))
|
||||
- Improve component identification in no-op `setState` warning. ([@keyanzhang](https://github.com/keyanzhang) in [#7326](https://github.com/facebook/react/pull/7326))
|
||||
|
||||
### React DOM
|
||||
- Fix issue with nested server rendering. ([@Aweary](https://github.com/Aweary) in [#7033](https://github.com/facebook/react/pull/7033))
|
||||
- Add `xmlns`, `xmlnsXlink` to supported SVG attributes. ([@salzhrani](https://github.com/salzhrani) in [#6471](https://github.com/facebook/react/pull/6471))
|
||||
- Add `referrerPolicy` to supported HTML attributes. ([@Aweary](https://github.com/Aweary) in [#7274](https://github.com/facebook/react/pull/7274))
|
||||
- Fix issue resulting in `<input type="range">` initial value being rounded. ([@troydemonbreun](https://github.com/troydemonbreun) in [#7251](https://github.com/facebook/react/pull/7251))
|
||||
|
||||
### React Test Renderer
|
||||
- Initial public release of package allowing more focused testing. Install with `npm install react-test-renderer`. ([@spicyj](https://github.com/spicyj) in [#6944](https://github.com/facebook/react/pull/6944), [#7258](https://github.com/facebook/react/pull/7258), [@iamdustan](https://github.com/iamdustan) in [#7362](https://github.com/facebook/react/pull/7362))
|
||||
|
||||
### React Perf Add-on
|
||||
- Fix issue resulting in excessive warnings when encountering an internal measurement error. ([@sassanh](https://github.com/sassanh) in [#7299](https://github.com/facebook/react/pull/7299))
|
||||
|
||||
### React TestUtils Add-on
|
||||
- Implement `type` property on for events created via `TestUtils.Simulate.*`. ([@yaycmyk](https://github.com/yaycmyk) in [#6154](https://github.com/facebook/react/pull/6154))
|
||||
- Fix crash when running TestUtils with the production build of React. ([@gaearon](https://github.com/gaearon) in [#7246](https://github.com/facebook/react/pull/7246))
|
||||
|
||||
|
||||
## 15.2.1 (July 8, 2016)
|
||||
|
||||
### React
|
||||
- Fix errant warning about missing React element. ([@gaearon](https://github.com/gaearon) in [#7193](https://github.com/facebook/react/pull/7193))
|
||||
- Better removal of dev-only code, leading to a small reduction in the minified production bundle size. ([@gaearon](https://github.com/gaearon) in [#7188](https://github.com/facebook/react/pull/7188), [#7189](https://github.com/facebook/react/pull/7189))
|
||||
|
||||
### React DOM
|
||||
- Add stack trace to null input value warning. ([@jimfb](https://github.com/jimfb) in [#7040](https://github.com/facebook/react/pull/7040))
|
||||
- Fix webcomponents example. ([@jalexanderfox](https://github.com/jalexanderfox) in [#7057](https://github.com/facebook/react/pull/7057))
|
||||
- Fix `unstable_renderSubtreeIntoContainer` so that context properly updates when linked to state. ([@gaearon](https://github.com/gaearon) in [#7125](https://github.com/facebook/react/pull/7125))
|
||||
- Improve invariant wording for void elements. ([@starkch](https://github.com/starkch) in [#7066](https://github.com/facebook/react/pull/7066))
|
||||
- Ensure no errors are thrown due to event handlers in server rendering. ([@rricard](https://github.com/rricard) in [#7127](https://github.com/facebook/react/pull/7127))
|
||||
- Fix regression resulting in `value`-less submit and reset inputs removing the browser-default text. ([@zpao](https://github.com/zpao) in [#7197](https://github.com/facebook/react/pull/7197))
|
||||
- Fix regression resulting in empty `name` attribute being added to inputs when not provided. ([@okonet](https://github.com/okonet) in [#7199](https://github.com/facebook/react/pull/7199))
|
||||
- Fix issue with nested server rendering. ([@Aweary](https://github.com/Aweary) in [#7033](https://github.com/facebook/react/pull/7033))
|
||||
|
||||
### React Perf Add-on
|
||||
- Make `ReactPerf.start()` work properly during lifecycle methods. ([@gaearon](https://github.com/gaearon) in [#7208](https://github.com/facebook/react/pull/7208)).
|
||||
|
||||
### React CSSTransitionGroup Add-on
|
||||
- Fix issue resulting in spurious unknown property warnings. ([@batusai513](https://github.com/batusai513) in [#7165](https://github.com/facebook/react/pull/7165))
|
||||
|
||||
### React Native Renderer
|
||||
- Improve error handling in cross-platform touch event handling. ([@yungsters](https://github.com/yungsters) in [#7143](https://github.com/facebook/react/pull/7143))
|
||||
|
||||
|
||||
## 15.2.0 (July 1, 2016)
|
||||
|
||||
### React
|
||||
- Add error codes to production invariants, with links to the view the full error text. ([@keyanzhang](https://github.com/keyanzhang) in [#6948](https://github.com/facebook/react/pull/6948))
|
||||
- Include component stack information in PropType validation warnings. ([@troydemonbreun](https://github.com/troydemonbreun) in [#6398](https://github.com/facebook/react/pull/6398), [@spicyj](https://github.com/spicyj) in [#6771](https://github.com/facebook/react/pull/6771))
|
||||
- Include component stack information in key warnings. ([@keyanzhang](https://github.com/keyanzhang) in [#6799](https://github.com/facebook/react/pull/6799))
|
||||
- Stop validating props at mount time, only validate at element creation. ([@keyanzhang](https://github.com/keyanzhang) in [#6824](https://github.com/facebook/react/pull/6824))
|
||||
- New invariant providing actionable error in missing instance case. ([@yungsters](https://github.com/yungsters) in [#6990](https://github.com/facebook/react/pull/6990))
|
||||
- Add `React.PropTypes.symbol` to support ES2015 Symbols as props. ([@puradox](https://github.com/puradox) in [#6377](https://github.com/facebook/react/pull/6377))
|
||||
- Fix incorrect coercion of ref or key that are undefined in development ([@gaearon](https://github.com/gaearon) in [#6880](https://github.com/facebook/react/pull/6880))
|
||||
- Fix a false positive when passing other element’s props to cloneElement ([@ericmatthys](https://github.com/ericmatthys) in [#6268](https://github.com/facebook/react/pull/6268))
|
||||
- Warn if you attempt to define `childContextTypes` on a functional component ([@Aweary](https://github.com/Aweary) in [#6933](https://github.com/facebook/react/pull/6933))
|
||||
|
||||
### React DOM
|
||||
- Add warning for unknown properties on DOM elements. ([@jimfb](https://github.com/jimfb) in [#6800](https://github.com/facebook/react/pull/6800), [@gm758](https://github.com/gm758) in [#7152](https://github.com/facebook/react/pull/7152))
|
||||
- Properly remove attributes from custom elements. ([@grassator](https://github.com/grassator) in [#6748](https://github.com/facebook/react/pull/6748))
|
||||
- Fix invalid unicode escape in attribute name regular expression. ([@nbjahan](https://github.com/nbjahan) in [#6772](https://github.com/facebook/react/pull/6772))
|
||||
- Add `onLoad` handling to `<link>` element. ([@roderickhsiao](https://github.com/roderickhsiao) in [#6815](https://github.com/facebook/react/pull/6815))
|
||||
- Add `onError` handling to `<source>` element. ([@wadahiro](https://github.com/wadahiro) in [#6941](https://github.com/facebook/react/pull/6941))
|
||||
- Handle `value` and `defaultValue` more accurately in the DOM. ([@jimfb](https://github.com/jimfb) in [#6406](https://github.com/facebook/react/pull/6406))
|
||||
- Fix events issue in environments with mutated `Object.prototype`. ([@Weizenlol](https://github.com/Weizenlol) in [#6886](https://github.com/facebook/react/pull/6886))
|
||||
- Fix issue where `is="null"` ended up in the DOM in Firefox. ([@darobin](https://github.com/darobin) in [#6896](https://github.com/facebook/react/pull/6896))
|
||||
- Improved performance of text escaping by using [escape-html](https://github.com/component/escape-html). ([@aickin](https://github.com/aickin) in [#6862](https://github.com/facebook/react/pull/6862))
|
||||
- Fix issue with `dangerouslySetInnerHTML` and SVG in Internet Explorer. ([@joshhunt](https://github.com/joshhunt) in [#6982](https://github.com/facebook/react/pull/6982))
|
||||
- Fix issue with `<textarea>` placeholders. ([@jimfb](https://github.com/jimfb) in [#7002](https://github.com/facebook/react/pull/7002))
|
||||
- Fix controlled vs uncontrolled detection of `<input type="radio"/>`. ([@jimfb](https://github.com/jimfb) in [#7003](https://github.com/facebook/react/pull/7003))
|
||||
- Improve performance of updating text content. ([@trueadm](https://github.com/trueadm) in [#7005](https://github.com/facebook/react/pull/7005))
|
||||
- Ensure controlled `<select>` components behave the same on initial render as they do on updates. ([@yiminghe](https://github.com/yiminghe) in [#5362](https://github.com/facebook/react/pull/5362))
|
||||
|
||||
### React Perf Add-on
|
||||
- Add `isRunning()` API. ([@nfcampos](https://github.com/nfcampos) in [#6763](https://github.com/facebook/react/pull/6763))
|
||||
- Improve accuracy of lifecycle hook timing. ([@gaearon](https://github.com/gaearon) in [#6858](https://github.com/facebook/react/pull/6858))
|
||||
- Fix internal errors when using ReactPerf with portal components. ([@gaearon](https://github.com/gaearon) in [#6860](https://github.com/facebook/react/pull/6860))
|
||||
- Fix performance regression. ([@spicyj](https://github.com/spicyj) in [#6770](https://github.com/facebook/react/pull/6770))
|
||||
- Add warning that ReactPerf is not enabled in production. ([@sashashakun](https://github.com/sashashakun) in [#6884](https://github.com/facebook/react/pull/6884))
|
||||
|
||||
### React CSSTransitionGroup Add-on
|
||||
- Fix timing issue with `null` node. ([@keyanzhang](https://github.com/keyanzhang) in [#6958](https://github.com/facebook/react/pull/6958))
|
||||
|
||||
### React Native Renderer
|
||||
- Dependencies on React Native modules use CommonJS requires instead of providesModule. ([@davidaurelio](https://github.com/davidaurelio) in [#6715](https://github.com/facebook/react/pull/6715))
|
||||
|
||||
|
||||
## 15.1.0 (May 20, 2016)
|
||||
|
||||
### React
|
||||
- Ensure we're using the latest `object-assign`, which has protection against a non-spec-compliant native `Object.assign`. ([@zpao](https://github.com/zpao) in [#6681](https://github.com/facebook/react/pull/6681))
|
||||
- Add a new warning to communicate that `props` objects passed to `createElement` must be plain objects. ([@richardscarrott](https://github.com/richardscarrott) in [#6134](https://github.com/facebook/react/pull/6134))
|
||||
- Fix a batching bug resulting in some lifecycle methods incorrectly being called multiple times. ([@spicyj](https://github.com/spicyj) in [#6650](https://github.com/facebook/react/pull/6650))
|
||||
|
||||
### React DOM
|
||||
- Fix regression in custom elements support. ([@jscissr](https://github.com/jscissr) in [#6570](https://github.com/facebook/react/pull/6570))
|
||||
- Stop incorrectly warning about using `onScroll` event handler with server rendering. ([@Aweary](https://github.com/Aweary) in [#6678](https://github.com/facebook/react/pull/6678))
|
||||
- Fix grammar in the controlled input warning. ([@jakeboone02](https://github.com/jakeboone02) in [#6657](https://github.com/facebook/react/pull/6657))
|
||||
- Fix issue preventing `<object>` nodes from being able to read `<param>` nodes in IE. ([@syranide](https://github.com/syranide) in [#6691](https://github.com/facebook/react/pull/6691))
|
||||
- Fix issue resulting in crash when using experimental error boundaries with server rendering. ([@jimfb](https://github.com/jimfb) in [#6694](https://github.com/facebook/react/pull/6694))
|
||||
- Add additional information to the controlled input warning. ([@borisyankov](https://github.com/borisyankov) in [#6341](https://github.com/facebook/react/pull/6341))
|
||||
|
||||
### React Perf Add-on
|
||||
- Completely rewritten to collect data more accurately and to be easier to maintain. ([@gaearon](https://github.com/gaearon) in [#6647](https://github.com/facebook/react/pull/6647), [#6046](https://github.com/facebook/react/pull/6046))
|
||||
|
||||
### React Native Renderer
|
||||
- Remove some special cases for platform specific branching. ([@sebmarkbage](https://github.com/sebmarkbage) in [#6660](https://github.com/facebook/react/pull/6660))
|
||||
- Remove use of `merge` utility. ([@sebmarkbage](https://github.com/sebmarkbage) in [#6634](https://github.com/facebook/react/pull/6634))
|
||||
- Renamed some modules to better indicate usage ([@javache](https://github.com/javache) in [#6643](https://github.com/facebook/react/pull/6643))
|
||||
|
||||
|
||||
## 15.0.2 (April 29, 2016)
|
||||
|
||||
### React
|
||||
- Removed extraneous files from npm package. ([@gaearon](https://github.com/gaearon) in [#6388](https://github.com/facebook/react/pull/6388))
|
||||
- Ensure `componentWillUnmount` is only called once. ([@jimfb](https://github.com/jimfb) in [#6613](https://github.com/facebook/react/pull/6613))
|
||||
|
||||
### ReactDOM
|
||||
- Fixed bug resulting in disabled buttons responding to mouse events in IE. ([@nhunzaker](https://github.com/nhunzaker) in [#6215](https://github.com/facebook/react/pull/6215))
|
||||
- Ensure `<option>`s are correctly selected when inside `<optgroup>`. ([@trevorsmith](https://github.com/trevorsmith) in [#6442](https://github.com/facebook/react/pull/6442))
|
||||
- Restore support for rendering into a shadow root. ([@Wildhoney](https://github.com/Wildhoney) in [#6462](https://github.com/facebook/react/pull/6462))
|
||||
- Ensure nested `<body>` elements are caught when warning for invalid markup. ([@keyanzhang](https://github.com/keyanzhang) in [#6469](https://github.com/facebook/react/pull/6469))
|
||||
- Improve warning when encountering multiple elements with the same key. ([@hkal](https://github.com/hkal) in [#6500](https://github.com/facebook/react/pull/6500))
|
||||
|
||||
### React TestUtils Add-on
|
||||
- Ensure that functional components do not have an owner. ([@gaearon](https://github.com/gaearon) in [#6362](https://github.com/facebook/react/pull/6362))
|
||||
- Handle invalid arguments to `scryRenderedDOMComponentsWithClass` better. ([@ipeters90](https://github.com/ipeters90) in [#6529](https://github.com/facebook/react/pull/6529))
|
||||
|
||||
### React Perf Add-on
|
||||
- Ignore DOM operations that occur outside the batch operation. ([@gaearon](https://github.com/gaearon) in [#6516](https://github.com/facebook/react/pull/6516))
|
||||
|
||||
### React Native Renderer
|
||||
- These files are now shipped inside the React npm package. They have no impact on React core or ReactDOM.
|
||||
|
||||
|
||||
## 15.0.1 (April 8, 2016)
|
||||
|
||||
### React
|
||||
- Restore `React.__spread` API to unbreak code compiled with some tools making use of this undocumented API. It is now officially deprecated. ([@zpao](https://github.com/zpao) in [#6444](https://github.com/facebook/react/pull/6444))
|
||||
|
||||
### ReactDOM
|
||||
- Fixed issue resulting in loss of cursor position in controlled inputs. ([@spicyj](https://github.com/spicyj) in [#6449](https://github.com/facebook/react/pull/6449))
|
||||
|
||||
|
||||
## 15.0.0 (April 7, 2016)
|
||||
|
||||
### Major changes
|
||||
|
||||
- **Initial render now uses `document.createElement` instead of generating HTML.** Previously we would generate a large string of HTML and then set `node.innerHTML`. At the time, this was decided to be faster than using `document.createElement` for the majority of cases and browsers that we supported. Browsers have continued to improve and so overwhelmingly this is no longer true. By using `createElement` we can make other parts of React faster. ([@spicyj](https://github.com/spicyj) in [#5205](https://github.com/facebook/react/pull/5205))
|
||||
- **`data-reactid` is no longer on every node.** As a result of using `document.createElement`, we can prime the node cache as we create DOM nodes, allowing us to skip a potential lookup (which used the `data-reactid` attribute). Root nodes will have a `data-reactroot` attribute and server generated markup will still contain `data-reactid`. ([@spicyj](https://github.com/spicyj) in [#5205](https://github.com/facebook/react/pull/5205))
|
||||
- **No more extra `<span>`s.** ReactDOM will now render plain text nodes interspersed with comment nodes that are used for demarcation. This gives us the same ability to update individual pieces of text, without creating extra nested nodes. If you were targeting these `<span>`s in your CSS, you will need to adjust accordingly. You can always render them explicitly in your components. ([@mwiencek](https://github.com/mwiencek) in [#5753](https://github.com/facebook/react/pull/5753))
|
||||
- **Rendering `null` now uses comment nodes.** Previously `null` would render to `<noscript>` elements. We now use comment nodes. This may cause issues if making use of `:nth-child` CSS selectors. While we consider this rendering behavior an implementation detail of React, it's worth noting the potential problem. ([@spicyj](https://github.com/spicyj) in [#5451](https://github.com/facebook/react/pull/5451))
|
||||
- **Functional components can now return `null`.** We added support for [defining stateless components as functions](/react/blog/2015/09/10/react-v0.14-rc1.html#stateless-function-components) in React 0.14. However, React 0.14 still allowed you to define a class component without extending `React.Component` or using `React.createClass()`, so [we couldn’t reliably tell if your component is a function or a class](https://github.com/facebook/react/issues/5355), and did not allow returning `null` from it. This issue is solved in React 15, and you can now return `null` from any component, whether it is a class or a function. ([@jimfb](https://github.com/jimfb) in [#5884](https://github.com/facebook/react/pull/5884))
|
||||
- **Improved SVG support.** All SVG tags are now fully supported. (Uncommon SVG tags are not present on the `React.DOM` element helper, but JSX and `React.createElement` work on all tag names.) All SVG attributes that are implemented by the browsers should be supported too. If you find any attributes that we have missed, please [let us know in this issue](https://github.com/facebook/react/issues/1657). ([@zpao](https://github.com/zpao) in [#6243](https://github.com/facebook/react/pull/6243))
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- **No more extra `<span>`s.**
|
||||
- **`React.cloneElement()` now resolves `defaultProps`.** We fixed a bug in `React.cloneElement()` that some components may rely on. If some of the `props` received by `cloneElement()` are `undefined`, it used to return an element with `undefined` values for those props. We’re changing it to be consistent with `createElement()`. Now any `undefined` props passed to `cloneElement()` are resolved to the corresponding component’s `defaultProps`. ([@truongduy134](https://github.com/truongduy134) in [#5997](https://github.com/facebook/react/pull/5997))
|
||||
- **`ReactPerf.getLastMeasurements()` is opaque.** This change won’t affect applications but may break some third-party tools. We are [revamping `ReactPerf` implementation](https://github.com/facebook/react/pull/6046) and plan to release it during the 15.x cycle. The internal performance measurement format is subject to change so, for the time being, we consider the return value of `ReactPerf.getLastMeasurements()` an opaque data structure that should not be relied upon. ([@gaearon](https://github.com/gaearon) in [#6286](https://github.com/facebook/react/pull/6286))
|
||||
|
||||
#### Removed deprecations
|
||||
|
||||
These deprecations were introduced nine months ago in v0.14 with a warning and are removed:
|
||||
|
||||
- Deprecated APIs are removed from the `React` top-level export: `findDOMNode`, `render`, `renderToString`, `renderToStaticMarkup`, and `unmountComponentAtNode`. As a reminder, they are now available on `ReactDOM` and `ReactDOMServer`. ([@jimfb](https://github.com/jimfb) in [#5832](https://github.com/facebook/react/pull/5832))
|
||||
- Deprecated addons are removed: `batchedUpdates` and `cloneWithProps`. ([@jimfb](https://github.com/jimfb) in [#5859](https://github.com/facebook/react/pull/5859), [@zpao](https://github.com/zpao) in [#6016](https://github.com/facebook/react/pull/6016))
|
||||
- Deprecated component instance methods are removed: `setProps`, `replaceProps`, and `getDOMNode`. ([@jimfb](https://github.com/jimfb) in [#5570](https://github.com/facebook/react/pull/5570))
|
||||
- Deprecated CommonJS `react/addons` entry point is removed. As a reminder, you should use separate `react-addons-*` packages instead. This only applies if you use the CommonJS builds. ([@gaearon](https://github.com/gaearon) in [#6285](https://github.com/facebook/react/pull/6285))
|
||||
- Passing `children` to void elements like `<input>` was deprecated, and now throws an error. ([@jonhester](https://github.com/jonhester) in [#3372](https://github.com/facebook/react/pull/3372))
|
||||
- React-specific properties on DOM `refs` (e.g. `this.refs.div.props`) were deprecated, and are removed now. ([@jimfb](https://github.com/jimfb) in [#5495](https://github.com/facebook/react/pull/5495))
|
||||
|
||||
### New deprecations, introduced with a warning
|
||||
|
||||
Each of these changes will continue to work as before with a new warning until the release of React 16 so you can upgrade your code gradually.
|
||||
|
||||
- `LinkedStateMixin` and `valueLink` are now deprecated due to very low popularity. If you need this, you can use a wrapper component that implements the same behavior: [react-linked-input](https://www.npmjs.com/package/react-linked-input). ([@jimfb](https://github.com/jimfb) in [#6127](https://github.com/facebook/react/pull/6127))
|
||||
- Future versions of React will treat `<input value={null}>` as a request to clear the input. However, React 0.14 has been ignoring `value={null}`. React 15 warns you on a `null` input value and offers you to clarify your intention. To fix the warning, you may explicitly pass an empty string to clear a controlled input, or pass `undefined` to make the input uncontrolled. ([@antoaravinth](https://github.com/antoaravinth) in [#5048](https://github.com/facebook/react/pull/5048))
|
||||
- `ReactPerf.printDOM()` was renamed to `ReactPerf.printOperations()`, and `ReactPerf.getMeasurementsSummaryMap()` was renamed to `ReactPerf.getWasted()`. ([@gaearon](https://github.com/gaearon) in [#6287](https://github.com/facebook/react/pull/6287))
|
||||
|
||||
### New helpful warnings
|
||||
|
||||
- If you use a minified copy of the _development_ build, React DOM kindly encourages you to use the faster production build instead. ([@spicyj](https://github.com/spicyj) in [#5083](https://github.com/facebook/react/pull/5083))
|
||||
- React DOM: When specifying a unit-less CSS value as a string, a future version will not add `px` automatically. This version now warns in this case (ex: writing `style={{'{{'}}width: '300'}}`. Unitless *number* values like `width: 300` are unchanged. ([@pluma](https://github.com/pluma) in [#5140](https://github.com/facebook/react/pull/5140))
|
||||
- Synthetic Events will now warn when setting and accessing properties (which will not get cleared appropriately), as well as warn on access after an event has been returned to the pool. ([@kentcdodds](https://github.com/kentcdodds) in [#5940](https://github.com/facebook/react/pull/5940) and [@koba04](https://github.com/koba04) in [#5947](https://github.com/facebook/react/pull/5947))
|
||||
- Elements will now warn when attempting to read `ref` and `key` from the props. ([@prometheansacrifice](https://github.com/prometheansacrifice) in [#5744](https://github.com/facebook/react/pull/5744))
|
||||
- React will now warn if you pass a different `props` object to `super()` in the constructor. ([@prometheansacrifice](https://github.com/prometheansacrifice) in [#5346](https://github.com/facebook/react/pull/5346))
|
||||
- React will now warn if you call `setState()` inside `getChildContext()`. ([@raineroviir](https://github.com/raineroviir) in [#6121](https://github.com/facebook/react/pull/6121))
|
||||
- React DOM now attempts to warn for mistyped event handlers on DOM elements, such as `onclick` which should be `onClick`. ([@ali](https://github.com/ali) in [#5361](https://github.com/facebook/react/pull/5361))
|
||||
- React DOM now warns about `NaN` values in `style`. ([@jontewks](https://github.com/jontewks) in [#5811](https://github.com/facebook/react/pull/5811))
|
||||
- React DOM now warns if you specify both `value` and `defaultValue` for an input. ([@mgmcdermott](https://github.com/mgmcdermott) in [#5823](https://github.com/facebook/react/pull/5823))
|
||||
- React DOM now warns if an input switches between being controlled and uncontrolled. ([@TheBlasfem](https://github.com/TheBlasfem) in [#5864](https://github.com/facebook/react/pull/5864))
|
||||
- React DOM now warns if you specify `onFocusIn` or `onFocusOut` handlers as they are unnecessary in React. ([@jontewks](https://github.com/jontewks) in [#6296](https://github.com/facebook/react/pull/6296))
|
||||
- React now prints a descriptive error message when you pass an invalid callback as the last argument to `ReactDOM.render()`, `this.setState()`, or `this.forceUpdate()`. ([@conorhastings](https://github.com/conorhastings) in [#5193](https://github.com/facebook/react/pull/5193) and [@gaearon](https://github.com/gaearon) in [#6310](https://github.com/facebook/react/pull/6310))
|
||||
- Add-Ons: `TestUtils.Simulate()` now prints a helpful message if you attempt to use it with shallow rendering. ([@conorhastings](https://github.com/conorhastings) in [#5358](https://github.com/facebook/react/pull/5358))
|
||||
- PropTypes: `arrayOf()` and `objectOf()` provide better error messages for invalid arguments. ([@chicoxyzzy](https://github.com/chicoxyzzy) in [#5390](https://github.com/facebook/react/pull/5390))
|
||||
|
||||
### Notable bug fixes
|
||||
|
||||
- Fixed multiple small memory leaks. ([@spicyj](https://github.com/spicyj) in [#4983](https://github.com/facebook/react/pull/4983) and [@victor-homyakov](https://github.com/victor-homyakov) in [#6309](https://github.com/facebook/react/pull/6309))
|
||||
- Input events are handled more reliably in IE 10 and IE 11; spurious events no longer fire when using a placeholder. ([@jquense](https://github.com/jquense) in [#4051](https://github.com/facebook/react/pull/4051))
|
||||
- The `componentWillReceiveProps()` lifecycle method is now consistently called when `context` changes. ([@milesj](https://github.com/milesj) in [#5787](https://github.com/facebook/react/pull/5787))
|
||||
- `React.cloneElement()` doesn’t append slash to an existing `key` when used inside `React.Children.map()`. ([@ianobermiller](https://github.com/ianobermiller) in [#5892](https://github.com/facebook/react/pull/5892))
|
||||
- React DOM now supports the `cite` and `profile` HTML attributes. ([@AprilArcus](https://github.com/AprilArcus) in [#6094](https://github.com/facebook/react/pull/6094) and [@saiichihashimoto](https://github.com/saiichihashimoto) in [#6032](https://github.com/facebook/react/pull/6032))
|
||||
- React DOM now supports `cssFloat`, `gridRow` and `gridColumn` CSS properties. ([@stevenvachon](https://github.com/stevenvachon) in [#6133](https://github.com/facebook/react/pull/6133) and [@mnordick](https://github.com/mnordick) in [#4779](https://github.com/facebook/react/pull/4779))
|
||||
- React DOM now correctly handles `borderImageOutset`, `borderImageWidth`, `borderImageSlice`, `floodOpacity`, `strokeDasharray`, and `strokeMiterlimit` as unitless CSS properties. ([@rofrischmann](https://github.com/rofrischmann) in [#6210](https://github.com/facebook/react/pull/6210) and [#6270](https://github.com/facebook/react/pull/6270))
|
||||
- React DOM now supports the `onAnimationStart`, `onAnimationEnd`, `onAnimationIteration`, `onTransitionEnd`, and `onInvalid` events. Support for `onLoad` has been added to `object` elements. ([@tomduncalf](https://github.com/tomduncalf) in [#5187](https://github.com/facebook/react/pull/5187), [@milesj](https://github.com/milesj) in [#6005](https://github.com/facebook/react/pull/6005), and [@ara4n](https://github.com/ara4n) in [#5781](https://github.com/facebook/react/pull/5781))
|
||||
- React DOM now defaults to using DOM attributes instead of properties, which fixes a few edge case bugs. Additionally the nullification of values (ex: `href={null}`) now results in the forceful removal, no longer trying to set to the default value used by browsers in the absence of a value. ([@syranide](https://github.com/syranide) in [#1510](https://github.com/facebook/react/pull/1510))
|
||||
- React DOM does not mistakingly coerce `children` to strings for Web Components. ([@jimfb](https://github.com/jimfb) in [#5093](https://github.com/facebook/react/pull/5093))
|
||||
- React DOM now correctly normalizes SVG `<use>` events. ([@edmellum](https://github.com/edmellum) in [#5720](https://github.com/facebook/react/pull/5720))
|
||||
- React DOM does not throw if a `<select>` is unmounted while its `onChange` handler is executing. ([@sambev](https://github.com/sambev) in [#6028](https://github.com/facebook/react/pull/6028))
|
||||
- React DOM does not throw in Windows 8 apps. ([@Andrew8xx8](https://github.com/Andrew8xx8) in [#6063](https://github.com/facebook/react/pull/6063))
|
||||
- React DOM does not throw when asynchronously unmounting a child with a `ref`. ([@yiminghe](https://github.com/yiminghe) in [#6095](https://github.com/facebook/react/pull/6095))
|
||||
- React DOM no longer forces synchronous layout because of scroll position tracking. ([@syranide](https://github.com/syranide) in [#2271](https://github.com/facebook/react/pull/2271))
|
||||
- `Object.is` is used in a number of places to compare values, which leads to fewer false positives, especially involving `NaN`. In particular, this affects the `shallowCompare` add-on. ([@chicoxyzzy](https://github.com/chicoxyzzy) in [#6132](https://github.com/facebook/react/pull/6132))
|
||||
- Add-Ons: ReactPerf no longer instruments adding or removing an event listener because they don’t really touch the DOM due to event delegation. ([@antoaravinth](https://github.com/antoaravinth) in [#5209](https://github.com/facebook/react/pull/5209))
|
||||
|
||||
### Other improvements
|
||||
|
||||
- React now uses `loose-envify` instead of `envify` so it installs fewer transitive dependencies. ([@qerub](https://github.com/qerub) in [#6303](https://github.com/facebook/react/pull/6303))
|
||||
- Shallow renderer now exposes `getMountedInstance()`. ([@glenjamin](https://github.com/glenjamin) in [#4918](https://github.com/facebook/react/pull/4918))
|
||||
- Shallow renderer now returns the rendered output from `render()`. ([@simonewebdesign](https://github.com/simonewebdesign) in [#5411](https://github.com/facebook/react/pull/5411))
|
||||
- React no longer depends on ES5 *shams* for `Object.create` and `Object.freeze` in older environments. It still, however, requires ES5 *shims* in those environments. ([@dgreensp](https://github.com/dgreensp) in [#4959](https://github.com/facebook/react/pull/4959))
|
||||
- React DOM now allows `data-` attributes with names that start with numbers. ([@nLight](https://github.com/nLight) in [#5216](https://github.com/facebook/react/pull/5216))
|
||||
- React DOM adds a new `suppressContentEditableWarning` prop for components like [Draft.js](https://facebook.github.io/draft-js/) that intentionally manage `contentEditable` children with React. ([@mxstbr](https://github.com/mxstbr) in [#6112](https://github.com/facebook/react/pull/6112))
|
||||
- React improves the performance for `createClass()` on complex specs. ([@spicyj](https://github.com/spicyj) in [#5550](https://github.com/facebook/react/pull/5550))
|
||||
|
||||
|
||||
## 0.14.8 (March 29, 2016)
|
||||
|
||||
### React
|
||||
- Fixed memory leak when rendering on the server
|
||||
|
||||
## 0.14.7 (January 28, 2016)
|
||||
|
||||
### React
|
||||
- Fixed bug with `<option>` tags when using `dangerouslySetInnerHTML`
|
||||
- Fixed memory leak in synthetic event system
|
||||
|
||||
### React TestUtils Add-on
|
||||
- Fixed bug with calling `setState` in `componentWillMount` when using shallow rendering
|
||||
|
||||
|
||||
## 0.14.6 (January 6, 2016)
|
||||
|
||||
### React
|
||||
- Updated `fbjs` dependency to pick up change affecting handling of undefined document.
|
||||
|
||||
|
||||
## 0.14.5 (December 29, 2015)
|
||||
|
||||
### React
|
||||
- More minor internal changes for better compatibility with React Native
|
||||
|
||||
|
||||
## 0.14.4 (December 29, 2015)
|
||||
|
||||
### React
|
||||
- Minor internal changes for better compatibility with React Native
|
||||
|
||||
### React DOM
|
||||
- The `autoCapitalize` and `autoCorrect` props are now set as attributes in the DOM instead of properties to improve cross-browser compatibility
|
||||
- Fixed bug with controlled `<select>` elements not handling updates properly
|
||||
|
||||
### React Perf Add-on
|
||||
- Some DOM operation names have been updated for clarity in the output of `.printDOM()`
|
||||
|
||||
|
||||
## 0.14.3 (November 18, 2015)
|
||||
|
||||
### React DOM
|
||||
- Added support for `nonce` attribute for `<script>` and `<style>` elements
|
||||
- Added support for `reversed` attribute for `<ol>` elements
|
||||
|
||||
### React TestUtils Add-on
|
||||
- Fixed bug with shallow rendering and function refs
|
||||
|
||||
### React CSSTransitionGroup Add-on
|
||||
- Fixed bug resulting in timeouts firing incorrectly when mounting and unmounting rapidly
|
||||
|
||||
### React on Bower
|
||||
- Added `react-dom-server.js` to expose `renderToString` and `renderToStaticMarkup` for usage in the browser
|
||||
|
||||
|
||||
## 0.14.2 (November 2, 2015)
|
||||
|
||||
### React DOM
|
||||
- Fixed bug with development build preventing events from firing in some versions of Internet Explorer & Edge
|
||||
- Fixed bug with development build when using es5-sham in older versions of Internet Explorer
|
||||
- Added support for `integrity` attribute
|
||||
- Fixed bug resulting in `children` prop being coerced to a string for custom elements, which was not the desired behavior
|
||||
- Moved `react` from `dependencies` to `peerDependencies` to match expectations and align with `react-addons-*` packages
|
||||
|
||||
|
||||
## 0.14.1 (October 28, 2015)
|
||||
|
||||
### React DOM
|
||||
- Fixed bug where events wouldn't fire in old browsers when using React in development mode
|
||||
- Fixed bug preventing use of `dangerouslySetInnerHTML` with Closure Compiler Advanced mode
|
||||
- Added support for `srcLang`, `default`, and `kind` attributes for `<track>` elements
|
||||
- Added support for `color` attribute
|
||||
- Ensured legacy `.props` access on DOM nodes is updated on re-renders
|
||||
|
||||
### React TestUtils Add-on
|
||||
- Fixed `scryRenderedDOMComponentsWithClass` so it works with SVG
|
||||
|
||||
### React CSSTransitionGroup Add-on
|
||||
- Fix bug preventing `0` to be used as a timeout value
|
||||
|
||||
### React on Bower
|
||||
- Added `react-dom.js` to `main` to improve compatibility with tooling
|
||||
|
||||
|
||||
## 0.14.0 (October 7, 2015)
|
||||
|
||||
### Major changes
|
||||
|
||||
- Split the main `react` package into two: `react` and `react-dom`. This paves the way to writing components that can be shared between the web version of React and React Native. This means you will need to include both files and some functions have been moved from `React` to `ReactDOM`.
|
||||
- Addons have been moved to separate packages (`react-addons-clone-with-props`, `react-addons-create-fragment`, `react-addons-css-transition-group`, `react-addons-linked-state-mixin`, `react-addons-perf`, `react-addons-pure-render-mixin`, `react-addons-shallow-compare`, `react-addons-test-utils`, `react-addons-transition-group`, `react-addons-update`, `ReactDOM.unstable_batchedUpdates`).
|
||||
- Stateless functional components - React components were previously created using React.createClass or using ES6 classes. This release adds a [new syntax](https://facebook.github.io/react/docs/reusable-components.html#stateless-functions) where a user defines a single [stateless render function](https://facebook.github.io/react/docs/reusable-components.html#stateless-functions) (with one parameter: `props`) which returns a JSX element, and this function may be used as a component.
|
||||
- Refs to DOM components as the DOM node itself. Previously the only useful thing you can do with a DOM component is call `getDOMNode()` to get the underlying DOM node. Starting with this release, a ref to a DOM component _is_ the actual DOM node. **Note that refs to custom (user-defined) components work exactly as before; only the built-in DOM components are affected by this change.**
|
||||
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- `React.initializeTouchEvents` is no longer necessary and has been removed completely. Touch events now work automatically.
|
||||
- Add-Ons: Due to the DOM node refs change mentioned above, `TestUtils.findAllInRenderedTree` and related helpers are no longer able to take a DOM component, only a custom component.
|
||||
- The `props` object is now frozen, so mutating props after creating a component element is no longer supported. In most cases, [`React.cloneElement`](https://facebook.github.io/react/docs/react-api.html#cloneelement) should be used instead. This change makes your components easier to reason about and enables the compiler optimizations mentioned above.
|
||||
- Plain objects are no longer supported as React children; arrays should be used instead. You can use the [`createFragment`](https://facebook.github.io/react/docs/create-fragment.html) helper to migrate, which now returns an array.
|
||||
- Add-Ons: `classSet` has been removed. Use [classnames](https://github.com/JedWatson/classnames) instead.
|
||||
- Web components (custom elements) now use native property names. Eg: `class` instead of `className`.
|
||||
|
||||
### Deprecations
|
||||
|
||||
- `this.getDOMNode()` is now deprecated and `ReactDOM.findDOMNode(this)` can be used instead. Note that in the common case, `findDOMNode` is now unnecessary since a ref to the DOM component is now the actual DOM node.
|
||||
- `setProps` and `replaceProps` are now deprecated. Instead, call ReactDOM.render again at the top level with the new props.
|
||||
- ES6 component classes must now extend `React.Component` in order to enable stateless function components. The [ES3 module pattern](https://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html#other-languages) will continue to work.
|
||||
- Reusing and mutating a `style` object between renders has been deprecated. This mirrors our change to freeze the `props` object.
|
||||
- Add-Ons: `cloneWithProps` is now deprecated. Use [`React.cloneElement`](https://facebook.github.io/react/docs/react-api.html#cloneelement) instead (unlike `cloneWithProps`, `cloneElement` does not merge `className` or `style` automatically; you can merge them manually if needed).
|
||||
- Add-Ons: To improve reliability, `CSSTransitionGroup` will no longer listen to transition events. Instead, you should specify transition durations manually using props such as `transitionEnterTimeout={500}`.
|
||||
|
||||
### Notable enhancements
|
||||
|
||||
- Added `React.Children.toArray` which takes a nested children object and returns a flat array with keys assigned to each child. This helper makes it easier to manipulate collections of children in your `render` methods, especially if you want to reorder or slice `this.props.children` before passing it down. In addition, `React.Children.map` now returns plain arrays too.
|
||||
- React uses `console.error` instead of `console.warn` for warnings so that browsers show a full stack trace in the console. (Our warnings appear when you use patterns that will break in future releases and for code that is likely to behave unexpectedly, so we do consider our warnings to be “must-fix” errors.)
|
||||
- Previously, including untrusted objects as React children [could result in an XSS security vulnerability](http://danlec.com/blog/xss-via-a-spoofed-react-element). This problem should be avoided by properly validating input at the application layer and by never passing untrusted objects around your application code. As an additional layer of protection, [React now tags elements](https://github.com/facebook/react/pull/4832) with a specific [ES2015 (ES6) `Symbol`](http://www.2ality.com/2014/12/es6-symbols.html) in browsers that support it, in order to ensure that React never considers untrusted JSON to be a valid element. If this extra security protection is important to you, you should add a `Symbol` polyfill for older browsers, such as the one included by [Babel’s polyfill](http://babeljs.io/docs/usage/polyfill/).
|
||||
- When possible, React DOM now generates XHTML-compatible markup.
|
||||
- React DOM now supports these standard HTML attributes: `capture`, `challenge`, `inputMode`, `is`, `keyParams`, `keyType`, `minLength`, `summary`, `wrap`. It also now supports these non-standard attributes: `autoSave`, `results`, `security`.
|
||||
- React DOM now supports these SVG attributes, which render into namespaced attributes: `xlinkActuate`, `xlinkArcrole`, `xlinkHref`, `xlinkRole`, `xlinkShow`, `xlinkTitle`, `xlinkType`, `xmlBase`, `xmlLang`, `xmlSpace`.
|
||||
- The `image` SVG tag is now supported by React DOM.
|
||||
- In React DOM, arbitrary attributes are supported on custom elements (those with a hyphen in the tag name or an `is="..."` attribute).
|
||||
- React DOM now supports these media events on `audio` and `video` tags: `onAbort`, `onCanPlay`, `onCanPlayThrough`, `onDurationChange`, `onEmptied`, `onEncrypted`, `onEnded`, `onError`, `onLoadedData`, `onLoadedMetadata`, `onLoadStart`, `onPause`, `onPlay`, `onPlaying`, `onProgress`, `onRateChange`, `onSeeked`, `onSeeking`, `onStalled`, `onSuspend`, `onTimeUpdate`, `onVolumeChange`, `onWaiting`.
|
||||
- Many small performance improvements have been made.
|
||||
- Many warnings show more context than before.
|
||||
- Add-Ons: A [`shallowCompare`](https://github.com/facebook/react/pull/3355) add-on has been added as a migration path for `PureRenderMixin` in ES6 classes.
|
||||
- Add-Ons: `CSSTransitionGroup` can now use [custom class names](https://github.com/facebook/react/blob/48942b85/docs/docs/10.1-animation.md#custom-classes) instead of appending `-enter-active` or similar to the transition name.
|
||||
|
||||
### New helpful warnings
|
||||
|
||||
- React DOM now warns you when nesting HTML elements invalidly, which helps you avoid surprising errors during updates.
|
||||
- Passing `document.body` directly as the container to `ReactDOM.render` now gives a warning as doing so can cause problems with browser extensions that modify the DOM.
|
||||
- Using multiple instances of React together is not supported, so we now warn when we detect this case to help you avoid running into the resulting problems.
|
||||
|
||||
### Notable bug fixes
|
||||
|
||||
- Click events are handled by React DOM more reliably in mobile browsers, particularly in Mobile Safari.
|
||||
- SVG elements are created with the correct namespace in more cases.
|
||||
- React DOM now renders `<option>` elements with multiple text children properly and renders `<select>` elements on the server with the correct option selected.
|
||||
- When two separate copies of React add nodes to the same document (including when a browser extension uses React), React DOM tries harder not to throw exceptions during event handling.
|
||||
- Using non-lowercase HTML tag names in React DOM (e.g., `React.createElement('DIV')`) no longer causes problems, though we continue to recommend lowercase for consistency with the JSX tag name convention (lowercase names refer to built-in components, capitalized names refer to custom components).
|
||||
- React DOM understands that these CSS properties are unitless and does not append “px” to their values: `animationIterationCount`, `boxOrdinalGroup`, `flexOrder`, `tabSize`, `stopOpacity`.
|
||||
- Add-Ons: When using the test utils, `Simulate.mouseEnter` and `Simulate.mouseLeave` now work.
|
||||
- Add-Ons: ReactTransitionGroup now correctly handles multiple nodes being removed simultaneously.
|
||||
|
||||
|
||||
### React Tools / Babel
|
||||
|
||||
#### Breaking Changes
|
||||
|
||||
- The `react-tools` package and `JSXTransformer.js` browser file [have been deprecated](https://facebook.github.io/react/blog/2015/06/12/deprecating-jstransform-and-react-tools.html). You can continue using version `0.13.3` of both, but we no longer support them and recommend migrating to [Babel](http://babeljs.io/), which has built-in support for React and JSX.
|
||||
|
||||
#### New Features
|
||||
|
||||
- Babel 5.8.24 introduces **Inlining React elements:** The `optimisation.react.inlineElements` transform converts JSX elements to object literals like `{type: 'div', props: ...}` instead of calls to `React.createElement`. This should only be enabled in production, since it disables some development warnings/checks.
|
||||
- Babel 5.8.24 introduces **Constant hoisting for React elements:** The `optimisation.react.constantElements` transform hoists element creation to the top level for subtrees that are fully static, which reduces calls to `React.createElement` and the resulting allocations. More importantly, it tells React that the subtree hasn’t changed so React can completely skip it when reconciling. This should only be enabled in production, since it disables some development warnings/checks.
|
||||
|
||||
|
||||
## 0.13.3 (May 8, 2015)
|
||||
|
||||
### React Core
|
||||
|
||||
#### New Features
|
||||
|
||||
* Added `clipPath` element and attribute for SVG
|
||||
* Improved warnings for deprecated methods in plain JS classes
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
* Loosened `dangerouslySetInnerHTML` restrictions so `{__html: undefined}` will no longer throw
|
||||
* Fixed extraneous context warning with non-pure `getChildContext`
|
||||
* Ensure `replaceState(obj)` retains prototype of `obj`
|
||||
|
||||
### React with Add-ons
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Test Utils: Ensure that shallow rendering works when components define `contextTypes`
|
||||
|
||||
|
||||
## 0.13.2 (April 18, 2015)
|
||||
|
||||
### React Core
|
||||
@@ -549,7 +21,7 @@ Each of these changes will continue to work as before with a new warning until t
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
* Immutability Helpers: Ensure it supports `hasOwnProperty` as an object key
|
||||
* Immutabilty Helpers: Ensure it supports `hasOwnProperty` as an object key
|
||||
|
||||
### React Tools
|
||||
|
||||
@@ -596,9 +68,9 @@ Each of these changes will continue to work as before with a new warning until t
|
||||
|
||||
#### New Features
|
||||
|
||||
* Support for using ES6 classes to build React components; see the [v0.13.0 beta 1 notes](https://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html) for details.
|
||||
* Support for using ES6 classes to build React components; see the [v0.13.0 beta 1 notes](http://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html) for details.
|
||||
* Added new top-level API `React.findDOMNode(component)`, which should be used in place of `component.getDOMNode()`. The base class for ES6-based components will not have `getDOMNode`. This change will enable some more patterns moving forward.
|
||||
* Added a new top-level API `React.cloneElement(el, props)` for making copies of React elements – see the [v0.13 RC2 notes](https://facebook.github.io/react/blog/2015/03/03/react-v0.13-rc2.html#react.cloneelement) for more details.
|
||||
* Added a new top-level API `React.cloneElement(el, props)` for making copies of React elements – see the [v0.13 RC2 notes](/react/blog/2015/03/03/react-v0.13-rc2.html#react.cloneelement) for more details.
|
||||
* New `ref` style, allowing a callback to be used in place of a name: `<Photo ref={(c) => this._photo = c} />` allows you to reference the component with `this._photo` (as opposed to `ref="photo"` which gives `this.refs.photo`).
|
||||
* `this.setState()` can now take a function as the first argument for transactional state updates, such as `this.setState((state, props) => ({count: state.count + 1}));` – this means that you no longer need to use `this._pendingState`, which is now gone.
|
||||
* Support for iterators and immutable-js sequences as children.
|
||||
@@ -612,7 +84,7 @@ Each of these changes will continue to work as before with a new warning until t
|
||||
|
||||
#### New Features
|
||||
|
||||
* [`React.addons.createFragment` was added](https://facebook.github.io/react/docs/create-fragment.html) for adding keys to entire sets of children.
|
||||
* [`React.addons.createFragment` was added](/react/docs/create-fragment.html) for adding keys to entire sets of children.
|
||||
|
||||
#### Deprecations
|
||||
|
||||
@@ -632,12 +104,6 @@ Each of these changes will continue to work as before with a new warning until t
|
||||
* `es3` restores the previous default behavior. An additional transform is added here to ensure the use of reserved words as properties is safe (eg `this.static` will become `this['static']` for IE8 compatibility).
|
||||
* The transform for the call spread operator has also been enabled.
|
||||
|
||||
### JSXTransformer
|
||||
|
||||
#### Breaking Changes
|
||||
|
||||
* The return value of `transform` now contains `sourceMap` as a JS object already, not an instance of `SourceMapGenerator`.
|
||||
|
||||
### JSX
|
||||
|
||||
#### Breaking Changes
|
||||
@@ -838,7 +304,7 @@ Each of these changes will continue to work as before with a new warning until t
|
||||
|
||||
#### New Features
|
||||
* Added warnings to help migrate towards descriptors
|
||||
* Made it possible to server render without React-related markup (`data-reactid`, `data-react-checksum`). This DOM will not be mountable by React. [Read the docs for `React.renderComponentToStaticMarkup`](https://facebook.github.io/react/docs/top-level-api.html#react.rendercomponenttostaticmarkup)
|
||||
* Made it possible to server render without React-related markup (`data-reactid`, `data-react-checksum`). This DOM will not be mountable by React. [Read the docs for `React.renderComponentToStaticMarkup`](http://facebook.github.io/react/docs/top-level-api.html#react.rendercomponenttostaticmarkup)
|
||||
* Added support for more attributes:
|
||||
* `srcSet` for `<img>` to specify images at different pixel ratios
|
||||
* `textAnchor` for SVG
|
||||
@@ -850,7 +316,7 @@ Each of these changes will continue to work as before with a new warning until t
|
||||
|
||||
### Addons
|
||||
|
||||
* `update` function to deal with immutable data. [Read the docs](https://facebook.github.io/react/docs/update.html)
|
||||
* `update` function to deal with immutable data. [Read the docs](http://facebook.github.io/react/docs/update.html)
|
||||
|
||||
### react-tools
|
||||
* Added an option argument to `transform` function. The only option supported is `harmony`, which behaves the same as `jsx --harmony` on the command line. This uses the ES6 transforms from [jstransform](https://github.com/facebook/jstransform).
|
||||
@@ -1012,7 +478,7 @@ Each of these changes will continue to work as before with a new warning until t
|
||||
|
||||
### React with Addons (New!)
|
||||
|
||||
* Introduced a separate build with several "addons" which we think can help improve the React experience. We plan to deprecate this in the long-term, instead shipping each as standalone pieces. [Read more in the docs](https://facebook.github.io/react/docs/addons.html).
|
||||
* Introduced a separate build with several "addons" which we think can help improve the React experience. We plan to deprecate this in the long-term, instead shipping each as standalone pieces. [Read more in the docs](http://facebook.github.io/react/docs/addons.html).
|
||||
|
||||
### JSX
|
||||
|
||||
@@ -1045,10 +511,10 @@ Each of these changes will continue to work as before with a new warning until t
|
||||
* Switch from using `id` attribute to `data-reactid` to track DOM nodes. This allows you to integrate with other JS and CSS libraries more easily.
|
||||
* Support for more DOM elements and attributes (e.g., `<canvas>`)
|
||||
* Improved server-side rendering APIs. `React.renderComponentToString(<component>, callback)` allows you to use React on the server and generate markup which can be sent down to the browser.
|
||||
* `prop` improvements: validation and default values. [Read our blog post for details...](https://facebook.github.io/react/blog/2013/07/11/react-v0-4-prop-validation-and-default-values.html)
|
||||
* Support for the `key` prop, which allows for finer control over reconciliation. [Read the docs for details...](https://facebook.github.io/react/docs/multiple-components.html)
|
||||
* Removed `React.autoBind`. [Read our blog post for details...](https://facebook.github.io/react/blog/2013/07/02/react-v0-4-autobind-by-default.html)
|
||||
* Improvements to forms. We've written wrappers around `<input>`, `<textarea>`, `<option>`, and `<select>` in order to standardize many inconsistencies in browser implementations. This includes support for `defaultValue`, and improved implementation of the `onChange` event, and circuit completion. [Read the docs for details...](https://facebook.github.io/react/docs/forms.html)
|
||||
* `prop` improvements: validation and default values. [Read our blog post for details...](http://facebook.github.io/react/blog/2013/07/11/react-v0-4-prop-validation-and-default-values.html)
|
||||
* Support for the `key` prop, which allows for finer control over reconciliation. [Read the docs for details...](http://facebook.github.io/react/docs/multiple-components.html)
|
||||
* Removed `React.autoBind`. [Read our blog post for details...](http://facebook.github.io/react/blog/2013/07/02/react-v0-4-autobind-by-default.html)
|
||||
* Improvements to forms. We've written wrappers around `<input>`, `<textarea>`, `<option>`, and `<select>` in order to standardize many inconsistencies in browser implementations. This includes support for `defaultValue`, and improved implementation of the `onChange` event, and circuit completion. [Read the docs for details...](http://facebook.github.io/react/docs/forms.html)
|
||||
* We've implemented an improved synthetic event system that conforms to the W3C spec.
|
||||
* Updates to your component are batched now, which may result in a significantly faster re-render of components. `this.setState` now takes an optional callback as it's second parameter. If you were using `onClick={this.setState.bind(this, state)}` previously, you'll want to make sure you add a third parameter so that the event is not treated as the callback.
|
||||
|
||||
@@ -1080,14 +546,14 @@ Each of these changes will continue to work as before with a new warning until t
|
||||
|
||||
* Upgrade Commoner so `require` statements are no longer relativized when passing through the transformer. This was a feature needed when building React, but doesn't translate well for other consumers of `bin/jsx`.
|
||||
* Upgraded our dependencies on Commoner and Recast so they use a different directory for their cache.
|
||||
* Freeze our Esprima dependency.
|
||||
* Freeze our esprima dependency.
|
||||
|
||||
|
||||
## 0.3.2 (May 31, 2013)
|
||||
|
||||
### JSX
|
||||
|
||||
* Improved compatibility with other coding styles (specifically, multiple assignments with a single `var`).
|
||||
* Improved compatability with other coding styles (specifically, multiple assignments with a single `var`).
|
||||
|
||||
### react-tools
|
||||
|
||||
|
||||
@@ -1,5 +1,70 @@
|
||||
# Contributing to React
|
||||
|
||||
Want to contribute to React? There are a few things you need to know.
|
||||
React is one of Facebook's first open source projects that is both under very active development and is also being used to ship code to everybody on [facebook.com](https://facebook.com). We're still working out the kinks to make contributing to this project as easy and transparent as possible, but we're not quite there yet. Hopefully this document makes the process for contributing clear and preempts some questions you may have.
|
||||
|
||||
We wrote a **[contribution guide](https://facebook.github.io/react/contributing/how-to-contribute.html)** to help you get started.
|
||||
## Our Development Process
|
||||
|
||||
Some of the core team will be working directly on GitHub. These changes will be public from the beginning. Other changesets will come via a bridge with Facebook's internal source control. This is a necessity as it allows engineers at Facebook outside of the core team to move fast and contribute from an environment they are comfortable in.
|
||||
|
||||
### `master` is unsafe
|
||||
|
||||
We will do our best to keep `master` in good shape, with tests passing at all times. But in order to move fast, we will make API changes that your application might not be compatible with. We will do our best to communicate these changes and always version appropriately so you can lock into a specific version if need be.
|
||||
|
||||
### Pull Requests
|
||||
|
||||
The core team will be monitoring for pull requests. When we get one, we'll run some Facebook-specific integration tests on it first. From here, we'll need to get another person to sign off on the changes and then merge the pull request. For API changes we may need to fix internal uses, which could cause some delay. We'll do our best to provide updates and feedback throughout the process.
|
||||
|
||||
*Before* submitting a pull request, please make sure the following is done…
|
||||
|
||||
1. Fork the repo and create your branch from `master`.
|
||||
2. If you've added code that should be tested, add tests!
|
||||
3. If you've changed APIs, update the documentation.
|
||||
4. Ensure the test suite passes (`grunt test`).
|
||||
5. Make sure your code lints (`grunt lint`) - we've done our best to make sure these rules match our internal linting guidelines.
|
||||
6. If you haven't already, complete the CLA.
|
||||
|
||||
### Contributor License Agreement ("CLA")
|
||||
|
||||
In order to accept your pull request, we need you to submit a CLA. You only need to do this once, so if you've done this for another Facebook open source project, you're good to go. If you are submitting a pull request for the first time, just let us know that you have completed the CLA and we can cross-check with your GitHub username.
|
||||
|
||||
[Complete your CLA here](https://code.facebook.com/cla)
|
||||
|
||||
## Bugs
|
||||
|
||||
### Where to Find Known Issues
|
||||
|
||||
We will be using GitHub Issues for our public bugs. We will keep a close eye on this and try to make it clear when we have an internal fix in progress. Before filing a new task, try to make sure your problem doesn't already exist.
|
||||
|
||||
### Reporting New Issues
|
||||
|
||||
The best way to get your bug fixed is to provide a reduced test case. jsFiddle, jsBin, and other sites provide a way to give live examples. Those are especially helpful though may not work for `JSX`-based code.
|
||||
|
||||
### Security Bugs
|
||||
|
||||
Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe disclosure of security bugs. With that in mind, please do not file public issues; go through the process outlined on that page.
|
||||
|
||||
## How to Get in Touch
|
||||
|
||||
* IRC - [#reactjs on freenode](http://webchat.freenode.net/?channels=reactjs)
|
||||
* Mailing list - [reactjs on Google Groups](http://groups.google.com/group/reactjs)
|
||||
|
||||
## Style Guide
|
||||
|
||||
### Code
|
||||
|
||||
* Use semicolons;
|
||||
* Commas last,
|
||||
* 2 spaces for indentation (no tabs)
|
||||
* Prefer `'` over `"`
|
||||
* `'use strict';`
|
||||
* 80 character line length
|
||||
* "Attractive"
|
||||
* Do not use the optional parameters of `setTimeout` and `setInterval`
|
||||
|
||||
### Documentation
|
||||
|
||||
* Do not wrap lines at 80 characters
|
||||
|
||||
## License
|
||||
|
||||
By contributing to React, you agree that your contributions will be licensed under its BSD license.
|
||||
|
||||
328
Gruntfile.js
328
Gruntfile.js
@@ -1,43 +1,44 @@
|
||||
'use strict';
|
||||
|
||||
var path = require('path');
|
||||
|
||||
var GULP_EXE = 'gulp';
|
||||
if (process.platform === 'win32') {
|
||||
GULP_EXE += '.cmd';
|
||||
}
|
||||
var jsxTask = require('./grunt/tasks/jsx');
|
||||
var browserifyTask = require('./grunt/tasks/browserify');
|
||||
var populistTask = require('./grunt/tasks/populist');
|
||||
var webdriverPhantomJSTask = require('./grunt/tasks/webdriver-phantomjs');
|
||||
var webdriverJasmineTasks = require('./grunt/tasks/webdriver-jasmine');
|
||||
var sauceTunnelTask = require('./grunt/tasks/sauce-tunnel');
|
||||
var npmTask = require('./grunt/tasks/npm');
|
||||
var releaseTasks = require('./grunt/tasks/release');
|
||||
var npmReactTasks = require('./grunt/tasks/npm-react');
|
||||
var npmReactToolsTasks = require('./grunt/tasks/npm-react-tools');
|
||||
var versionCheckTask = require('./grunt/tasks/version-check');
|
||||
var gemReactSourceTasks = require('./grunt/tasks/gem-react-source');
|
||||
var eslintTask = require('./grunt/tasks/eslint');
|
||||
|
||||
module.exports = function(grunt) {
|
||||
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
jsx: require('./grunt/config/jsx'),
|
||||
browserify: require('./grunt/config/browserify'),
|
||||
populist: require('./grunt/config/populist')(grunt),
|
||||
connect: require('./grunt/config/server')(grunt),
|
||||
'webdriver-jasmine': require('./grunt/config/webdriver-jasmine'),
|
||||
'webdriver-perf': require('./grunt/config/webdriver-perf'),
|
||||
npm: require('./grunt/config/npm'),
|
||||
clean: [
|
||||
'./build',
|
||||
'./*.gem',
|
||||
'./docs/_site',
|
||||
'./examples/shared/*.js',
|
||||
'.module-cache',
|
||||
'.module-cache'
|
||||
],
|
||||
'compare_size': require('./grunt/config/compare_size'),
|
||||
jshint: require('./grunt/config/jshint'),
|
||||
/*eslint-disable camelcase */
|
||||
compare_size: require('./grunt/config/compare_size')
|
||||
/*eslint-enable camelcase */
|
||||
});
|
||||
|
||||
function spawnGulp(args, opts, done) {
|
||||
|
||||
grunt.util.spawn({
|
||||
// This could be more flexible (require.resolve & lookup bin in package)
|
||||
// but if it breaks we'll fix it then.
|
||||
cmd: path.join('node_modules', '.bin', GULP_EXE),
|
||||
args: args,
|
||||
opts: Object.assign({stdio: 'inherit'}, opts),
|
||||
}, function(err, result, code) {
|
||||
if (err) {
|
||||
grunt.fail.fatal('Something went wrong running gulp: ', result);
|
||||
}
|
||||
done(code === 0);
|
||||
});
|
||||
}
|
||||
grunt.config.set('compress', require('./grunt/config/compress'));
|
||||
|
||||
Object.keys(grunt.file.readJSON('package.json').devDependencies)
|
||||
.filter(function(npmTaskName) {
|
||||
@@ -50,169 +51,246 @@ module.exports = function(grunt) {
|
||||
grunt.loadNpmTasks(npmTaskName);
|
||||
});
|
||||
|
||||
grunt.registerTask('eslint', function() {
|
||||
// Use gulp here.
|
||||
spawnGulp(['eslint'], null, this.async());
|
||||
});
|
||||
grunt.registerTask('eslint', eslintTask);
|
||||
|
||||
grunt.registerTask('lint', ['eslint']);
|
||||
|
||||
grunt.registerTask('flow', function() {
|
||||
// Use gulp here.
|
||||
spawnGulp(['flow'], null, this.async());
|
||||
});
|
||||
grunt.registerTask(
|
||||
'download-previous-version',
|
||||
require('./grunt/tasks/download-previous-version.js')
|
||||
);
|
||||
|
||||
grunt.registerTask('delete-build-modules', function() {
|
||||
// Use gulp here.
|
||||
spawnGulp(['react:clean'], null, this.async());
|
||||
if (grunt.file.exists('build/modules')) {
|
||||
grunt.file.delete('build/modules');
|
||||
}
|
||||
});
|
||||
|
||||
// Our own browserify-based tasks to build a single JS file build.
|
||||
grunt.registerMultiTask('browserify', require('./grunt/tasks/browserify'));
|
||||
// Register jsx:normal and :release tasks.
|
||||
grunt.registerMultiTask('jsx', jsxTask);
|
||||
|
||||
grunt.registerMultiTask('npm', require('./grunt/tasks/npm'));
|
||||
// Our own browserify-based tasks to build a single JS file build
|
||||
grunt.registerMultiTask('browserify', browserifyTask);
|
||||
|
||||
grunt.registerMultiTask('populist', populistTask);
|
||||
|
||||
grunt.registerTask('sauce-tunnel', sauceTunnelTask);
|
||||
|
||||
grunt.registerMultiTask('webdriver-jasmine', webdriverJasmineTasks);
|
||||
|
||||
grunt.registerMultiTask('webdriver-perf', require('./grunt/tasks/webdriver-perf'));
|
||||
|
||||
grunt.registerMultiTask('npm', npmTask);
|
||||
|
||||
var npmReactTasks = require('./grunt/tasks/npm-react');
|
||||
grunt.registerTask('npm-react:release', npmReactTasks.buildRelease);
|
||||
grunt.registerTask('npm-react:pack', npmReactTasks.packRelease);
|
||||
grunt.registerTask('npm-react-tools:release', npmReactToolsTasks.buildRelease);
|
||||
grunt.registerTask('npm-react-tools:pack', npmReactToolsTasks.packRelease);
|
||||
grunt.registerTask('gem-react-source:release', gemReactSourceTasks.buildRelease);
|
||||
grunt.registerTask('gem-react-source:pack', gemReactSourceTasks.packRelease);
|
||||
|
||||
var npmReactDOMTasks = require('./grunt/tasks/npm-react-dom');
|
||||
grunt.registerTask('npm-react-dom:release', npmReactDOMTasks.buildRelease);
|
||||
grunt.registerTask('npm-react-dom:pack', npmReactDOMTasks.packRelease);
|
||||
|
||||
var npmReactNativeTasks = require('./grunt/tasks/npm-react-native');
|
||||
grunt.registerTask('npm-react-native:release', npmReactNativeTasks.buildRelease);
|
||||
grunt.registerTask('npm-react-native:pack', npmReactNativeTasks.packRelease);
|
||||
|
||||
var npmReactAddonsTasks = require('./grunt/tasks/npm-react-addons');
|
||||
grunt.registerTask('npm-react-addons:release', npmReactAddonsTasks.buildReleases);
|
||||
grunt.registerTask('npm-react-addons:pack', npmReactAddonsTasks.packReleases);
|
||||
|
||||
var npmReactTestRendererTasks = require('./grunt/tasks/npm-react-test');
|
||||
grunt.registerTask('npm-react-test:release', npmReactTestRendererTasks.buildRelease);
|
||||
grunt.registerTask('npm-react-test:pack', npmReactTestRendererTasks.packRelease);
|
||||
|
||||
var npmReactNoopRendererTasks = require('./grunt/tasks/npm-react-noop');
|
||||
grunt.registerTask('npm-react-noop:release', npmReactNoopRendererTasks.buildRelease);
|
||||
grunt.registerTask('npm-react-noop:pack', npmReactNoopRendererTasks.packRelease);
|
||||
|
||||
grunt.registerTask('version-check', function() {
|
||||
// Use gulp here.
|
||||
spawnGulp(['version-check'], null, this.async());
|
||||
});
|
||||
grunt.registerTask('version-check', versionCheckTask);
|
||||
|
||||
grunt.registerTask('build:basic', [
|
||||
'build-modules',
|
||||
'jsx:normal',
|
||||
'version-check',
|
||||
'browserify:basic',
|
||||
'browserify:basic'
|
||||
]);
|
||||
grunt.registerTask('build:addons', [
|
||||
'build-modules',
|
||||
'browserify:addons',
|
||||
'jsx:normal',
|
||||
'browserify:addons'
|
||||
]);
|
||||
grunt.registerTask('build:transformer', [
|
||||
'jsx:normal',
|
||||
'browserify:transformer'
|
||||
]);
|
||||
grunt.registerTask('build:min', [
|
||||
'build-modules',
|
||||
'jsx:normal',
|
||||
'version-check',
|
||||
'browserify:min',
|
||||
'browserify:min'
|
||||
]);
|
||||
grunt.registerTask('build:addons-min', [
|
||||
'build-modules',
|
||||
'browserify:addonsMin',
|
||||
'jsx:normal',
|
||||
'browserify:addonsMin'
|
||||
]);
|
||||
grunt.registerTask('build:dom', [
|
||||
'build-modules',
|
||||
grunt.registerTask('build:withCodeCoverageLogging', [
|
||||
'jsx:normal',
|
||||
'version-check',
|
||||
'browserify:dom',
|
||||
'browserify:withCodeCoverageLogging'
|
||||
]);
|
||||
grunt.registerTask('build:dom-min', [
|
||||
'build-modules',
|
||||
grunt.registerTask('build:perf', [
|
||||
'jsx:normal',
|
||||
'version-check',
|
||||
'browserify:domMin',
|
||||
'browserify:transformer',
|
||||
'browserify:basic',
|
||||
'browserify:min',
|
||||
'download-previous-version'
|
||||
]);
|
||||
grunt.registerTask('build:dom-server', [
|
||||
'build-modules',
|
||||
grunt.registerTask('build:test', [
|
||||
'delete-build-modules',
|
||||
'jsx:test',
|
||||
'version-check',
|
||||
'browserify:domServer',
|
||||
]);
|
||||
grunt.registerTask('build:dom-server-min', [
|
||||
'build-modules',
|
||||
'version-check',
|
||||
'browserify:domServerMin',
|
||||
]);
|
||||
grunt.registerTask('build:dom-fiber', [
|
||||
'build-modules',
|
||||
'version-check',
|
||||
'browserify:domFiber',
|
||||
]);
|
||||
grunt.registerTask('build:dom-fiber-min', [
|
||||
'build-modules',
|
||||
'version-check',
|
||||
'browserify:domFiberMin',
|
||||
'populist:test'
|
||||
]);
|
||||
grunt.registerTask('build:npm-react', [
|
||||
'version-check',
|
||||
'build-modules',
|
||||
'npm-react:release',
|
||||
'jsx:normal',
|
||||
'npm-react:release'
|
||||
]);
|
||||
grunt.registerTask('build:gem-react-source', [
|
||||
'build',
|
||||
'gem-react-source:release'
|
||||
]);
|
||||
|
||||
var jestTasks = require('./grunt/tasks/jest');
|
||||
grunt.registerTask('jest:normal', jestTasks.normal);
|
||||
grunt.registerTask('jest:coverage', jestTasks.coverage);
|
||||
grunt.registerTask('webdriver-phantomjs', webdriverPhantomJSTask);
|
||||
|
||||
grunt.registerTask('test', ['jest:normal']);
|
||||
grunt.registerTask('coverage:parse', require('./grunt/tasks/coverage-parse'));
|
||||
|
||||
grunt.registerTask('test:webdriver:phantomjs', [
|
||||
'connect',
|
||||
'webdriver-phantomjs',
|
||||
'webdriver-jasmine:local'
|
||||
]);
|
||||
|
||||
grunt.registerTask('perf:webdriver:phantomjs', [
|
||||
'connect',
|
||||
'webdriver-phantomjs',
|
||||
'webdriver-perf:local'
|
||||
]);
|
||||
|
||||
grunt.registerTask('test:full', [
|
||||
'build:test',
|
||||
'build:basic',
|
||||
|
||||
'connect',
|
||||
'webdriver-phantomjs',
|
||||
'webdriver-jasmine:local',
|
||||
|
||||
'sauce-tunnel',
|
||||
'webdriver-jasmine:saucelabs_android',
|
||||
'webdriver-jasmine:saucelabs_firefox',
|
||||
'webdriver-jasmine:saucelabs_chrome'
|
||||
]);
|
||||
|
||||
grunt.registerTask('perf:full', [
|
||||
'build:perf',
|
||||
|
||||
'connect',
|
||||
'webdriver-phantomjs',
|
||||
'webdriver-perf:local',
|
||||
|
||||
'sauce-tunnel',
|
||||
'webdriver-perf:saucelabs_firefox',
|
||||
'webdriver-perf:saucelabs_chrome',
|
||||
'webdriver-perf:saucelabs_ie11',
|
||||
'webdriver-perf:saucelabs_ie8'
|
||||
]);
|
||||
|
||||
grunt.registerTask('test:webdriver:saucelabs', [
|
||||
'build:test',
|
||||
'build:basic',
|
||||
|
||||
'connect',
|
||||
'sauce-tunnel',
|
||||
'webdriver-jasmine:saucelabs_' + (process.env.BROWSER_NAME || 'ie8')
|
||||
]);
|
||||
|
||||
grunt.registerTask('test:webdriver:saucelabs:modern', [
|
||||
'build:test',
|
||||
'build:basic',
|
||||
|
||||
'connect',
|
||||
'sauce-tunnel',
|
||||
'webdriver-jasmine:saucelabs_android',
|
||||
'webdriver-jasmine:saucelabs_firefox',
|
||||
'webdriver-jasmine:saucelabs_chrome',
|
||||
'webdriver-jasmine:saucelabs_ie11'
|
||||
]);
|
||||
|
||||
grunt.registerTask('test:webdriver:saucelabs:ie', [
|
||||
'build:test',
|
||||
'build:basic',
|
||||
|
||||
'connect',
|
||||
'sauce-tunnel',
|
||||
'webdriver-jasmine:saucelabs_ie8',
|
||||
'webdriver-jasmine:saucelabs_ie9',
|
||||
'webdriver-jasmine:saucelabs_ie10',
|
||||
'webdriver-jasmine:saucelabs_ie11'
|
||||
]);
|
||||
|
||||
grunt.registerTask('test:webdriver:saucelabs:ios', [
|
||||
'build:test',
|
||||
'build:basic',
|
||||
|
||||
'connect',
|
||||
'sauce-tunnel',
|
||||
'webdriver-jasmine:saucelabs_ios6_1',
|
||||
'webdriver-jasmine:saucelabs_ios5_1',
|
||||
'webdriver-jasmine:saucelabs_ios4'
|
||||
]);
|
||||
|
||||
grunt.registerTask('test:coverage', [
|
||||
'build:test',
|
||||
'build:withCodeCoverageLogging',
|
||||
'test:webdriver:phantomjs',
|
||||
'coverage:parse'
|
||||
]);
|
||||
grunt.registerTask('fasttest', function() {
|
||||
if (grunt.option('debug')) {
|
||||
grunt.task.run('build:test', 'connect:server:keepalive');
|
||||
} else {
|
||||
grunt.task.run('build:test', 'test:webdriver:phantomjs');
|
||||
}
|
||||
});
|
||||
grunt.registerTask('test', function() {
|
||||
if (grunt.option('debug')) {
|
||||
grunt.task.run('build:test', 'build:basic', 'connect:server:keepalive');
|
||||
} else {
|
||||
grunt.task.run('build:test', 'build:basic', 'test:webdriver:phantomjs');
|
||||
}
|
||||
});
|
||||
grunt.registerTask('perf', ['build:perf', 'perf:webdriver:phantomjs']);
|
||||
grunt.registerTask('npm:test', ['build', 'npm:pack']);
|
||||
|
||||
// Optimized build task that does all of our builds. The subtasks will be run
|
||||
// in order so we can take advantage of that and only run build-modules once.
|
||||
// in order so we can take advantage of that and only run jsx:normal once.
|
||||
grunt.registerTask('build', [
|
||||
'delete-build-modules',
|
||||
'build-modules',
|
||||
'jsx:normal',
|
||||
'version-check',
|
||||
'browserify:basic',
|
||||
'browserify:transformer',
|
||||
'browserify:addons',
|
||||
'browserify:min',
|
||||
'browserify:addonsMin',
|
||||
'browserify:dom',
|
||||
'browserify:domMin',
|
||||
'browserify:domServer',
|
||||
'browserify:domServerMin',
|
||||
'browserify:domFiber',
|
||||
'browserify:domFiberMin',
|
||||
'npm-react:release',
|
||||
'npm-react:pack',
|
||||
'npm-react-dom:release',
|
||||
'npm-react-dom:pack',
|
||||
'npm-react-native:release',
|
||||
'npm-react-native:pack',
|
||||
'npm-react-addons:release',
|
||||
'npm-react-addons:pack',
|
||||
'npm-react-test:release',
|
||||
'npm-react-test:pack',
|
||||
'npm-react-noop:release',
|
||||
'npm-react-noop:pack',
|
||||
'compare_size',
|
||||
'npm-react-tools:release',
|
||||
'npm-react-tools:pack',
|
||||
'compare_size'
|
||||
]);
|
||||
|
||||
// Automate the release!
|
||||
var releaseTasks = require('./grunt/tasks/release');
|
||||
grunt.registerTask('release:setup', releaseTasks.setup);
|
||||
grunt.registerTask('release:bower', releaseTasks.bower);
|
||||
grunt.registerTask('release:docs', releaseTasks.docs);
|
||||
grunt.registerTask('release:msg', releaseTasks.msg);
|
||||
grunt.registerTask('release:starter', releaseTasks.starter);
|
||||
|
||||
grunt.registerTask('release', [
|
||||
'release:setup',
|
||||
'clean',
|
||||
'build',
|
||||
'gem-react-source:release',
|
||||
'gem-react-source:pack',
|
||||
'release:bower',
|
||||
'release:starter',
|
||||
'compress',
|
||||
'release:docs',
|
||||
'release:msg',
|
||||
'release:msg'
|
||||
]);
|
||||
|
||||
grunt.registerTask('build-modules', function() {
|
||||
spawnGulp(['react:modules'], null, this.async());
|
||||
});
|
||||
|
||||
// The default task - build - to keep setup easy.
|
||||
// The default task - build - to keep setup easy
|
||||
grunt.registerTask('default', ['build']);
|
||||
};
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -2,7 +2,7 @@ BSD License
|
||||
|
||||
For React software
|
||||
|
||||
Copyright (c) 2013-present, Facebook, Inc.
|
||||
Copyright (c) 2013-2015, Facebook, Inc.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
|
||||
92
README.md
92
README.md
@@ -1,25 +1,25 @@
|
||||
# [React](https://facebook.github.io/react/) · [](https://circleci.com/gh/facebook/react) [](https://travis-ci.org/facebook/react) [](https://coveralls.io/github/facebook/react?branch=master) [](https://www.npmjs.com/package/react) [](CONTRIBUTING.md#pull-requests)
|
||||
# [React](http://facebook.github.io/react) [](https://travis-ci.org/facebook/react)
|
||||
|
||||
React is a JavaScript library for building user interfaces.
|
||||
|
||||
* **Declarative:** React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes. Declarative views make your code more predictable, simpler to understand, and easier to debug.
|
||||
* **Component-Based:** Build encapsulated components that manage their own state, then compose them to make complex UIs. Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep state out of the DOM.
|
||||
* **Learn Once, Write Anywhere:** We don't make assumptions about the rest of your technology stack, so you can develop new features in React without rewriting existing code. React can also render on the server using Node and power mobile apps using [React Native](https://facebook.github.io/react-native/).
|
||||
* **Just the UI:** Lots of people use React as the V in MVC. Since React makes no assumptions about the rest of your technology stack, it's easy to try it out on a small feature in an existing project.
|
||||
* **Virtual DOM:** React uses a *virtual DOM* diff implementation for ultra-high performance. It can also render on the server using Node.js — no heavy browser DOM required.
|
||||
* **Data flow:** React implements one-way reactive data flow which reduces boilerplate and is easier to reason about than traditional data binding.
|
||||
|
||||
[Learn how to use React in your own project](https://facebook.github.io/react/docs/getting-started.html).
|
||||
[Learn how to use React in your own project.](http://facebook.github.io/react/docs/getting-started.html)
|
||||
|
||||
## Examples
|
||||
|
||||
We have several examples [on the website](https://facebook.github.io/react/). Here is the first one to get you started:
|
||||
We have several examples [on the website](http://facebook.github.io/react/). Here is the first one to get you started:
|
||||
|
||||
```jsx
|
||||
class HelloMessage extends React.Component {
|
||||
render() {
|
||||
```js
|
||||
var HelloMessage = React.createClass({
|
||||
render: function() {
|
||||
return <div>Hello {this.props.name}</div>;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
ReactDOM.render(
|
||||
React.render(
|
||||
<HelloMessage name="John" />,
|
||||
document.getElementById('container')
|
||||
);
|
||||
@@ -27,35 +27,70 @@ ReactDOM.render(
|
||||
|
||||
This example will render "Hello John" into a container on the page.
|
||||
|
||||
You'll notice that we used an HTML-like syntax; [we call it JSX](https://facebook.github.io/react/docs/introducing-jsx.html). JSX is not required to use React, but it makes code more readable, and writing it feels like writing HTML. We recommend using [Babel](https://babeljs.io/) with a [React preset](https://babeljs.io/docs/plugins/preset-react/) to convert JSX into native JavaScript for browsers to digest.
|
||||
You'll notice that we used an HTML-like syntax; [we call it JSX](http://facebook.github.io/react/docs/jsx-in-depth.html). JSX is not required to use React, but it makes code more readable, and writing it feels like writing HTML. A simple transform is included with React that allows converting JSX into native JavaScript for browsers to digest.
|
||||
|
||||
## Installation
|
||||
|
||||
React is available as the `react` package on [npm](https://www.npmjs.com/). It is also available on a [CDN](https://facebook.github.io/react/docs/installation.html#using-a-cdn).
|
||||
The fastest way to get started is to serve JavaScript from the CDN (also available on [cdnjs](https://cdnjs.com/libraries/react) and [jsdelivr](http://www.jsdelivr.com/#!react)):
|
||||
|
||||
React is flexible and can be used in a variety of projects. You can create new apps with it, but you can also gradually introduce it into an existing codebase without doing a rewrite.
|
||||
```html
|
||||
<!-- The core React library -->
|
||||
<script src="http://fb.me/react-0.13.2.js"></script>
|
||||
<!-- In-browser JSX transformer, remove when pre-compiling JSX. -->
|
||||
<script src="http://fb.me/JSXTransformer-0.13.2.js"></script>
|
||||
```
|
||||
|
||||
The recommended way to install React depends on your project. Here you can find short guides for the most common scenarios:
|
||||
We've also built a [starter kit](http://facebook.github.io/react/downloads/react-0.13.2.zip) which might be useful if this is your first time using React. It includes a webpage with an example of using React with live code.
|
||||
|
||||
* [Trying Out React](https://facebook.github.io/react/docs/installation.html#trying-out-react)
|
||||
* [Creating a Single Page Application](https://facebook.github.io/react/docs/installation.html#creating-a-single-page-application)
|
||||
* [Adding React to an Existing Application](https://facebook.github.io/react/docs/installation.html#adding-react-to-an-existing-application)
|
||||
If you'd like to use [bower](http://bower.io), it's as easy as:
|
||||
|
||||
## Contributing
|
||||
```sh
|
||||
bower install --save react
|
||||
```
|
||||
|
||||
The main purpose of this repository is to continue to evolve React core, making it faster and easier to use. Development of React happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving React.
|
||||
## Contribute
|
||||
|
||||
### [Code of Conduct](https://code.facebook.com/codeofconduct)
|
||||
The main purpose of this repository is to continue to evolve React core, making it faster and easier to use. If you're interested in helping with that, then keep reading. If you're not interested in helping right now that's ok too. :) Any feedback you have about using React would be greatly appreciated.
|
||||
|
||||
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read [the full text](https://code.facebook.com/codeofconduct) so that you can understand what actions will and will not be tolerated.
|
||||
### Building Your Copy of React
|
||||
|
||||
### Contributing Guide
|
||||
The process to build `react.js` is built entirely on top of node.js, using many libraries you may already be familiar with.
|
||||
|
||||
Read our [contributing guide](https://facebook.github.io/react/contributing/how-to-contribute.html) to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to React.
|
||||
#### Prerequisites
|
||||
|
||||
### Good First Bug
|
||||
* You have `node` installed at v0.10.0+ (it might work at lower versions, we just haven't tested).
|
||||
* You are familiar with `npm` and know whether or not you need to use `sudo` when installing packages globally.
|
||||
* You are familiar with `git`.
|
||||
|
||||
To help you get your feet wet and get you familiar with our contribution process, we have a list of [good first bugs](https://github.com/facebook/react/labels/good%20first%20bug) that contain bugs which are fairly easy to fix. This is a great place to get started.
|
||||
#### Build
|
||||
|
||||
Once you have the repository cloned, building a copy of `react.js` is really easy.
|
||||
|
||||
```sh
|
||||
# grunt-cli is needed by grunt; you might have this installed already
|
||||
npm install -g grunt-cli
|
||||
npm install
|
||||
grunt build
|
||||
```
|
||||
|
||||
At this point, you should now have a `build/` directory populated with everything you need to use React. The examples should all work.
|
||||
|
||||
### Grunt
|
||||
|
||||
We use grunt to automate many tasks. Run `grunt -h` to see a mostly complete listing. The important ones to know:
|
||||
|
||||
```sh
|
||||
# Build and run tests with PhantomJS
|
||||
grunt test
|
||||
# Build and run tests in your browser
|
||||
grunt test --debug
|
||||
# For speed, you can use fasttest and add --filter to only run one test
|
||||
grunt fasttest --filter=ReactIdentity
|
||||
# Lint the code with ESLint
|
||||
grunt lint
|
||||
# Wipe out build directory
|
||||
grunt clean
|
||||
```
|
||||
|
||||
### License
|
||||
|
||||
@@ -65,5 +100,6 @@ React documentation is [Creative Commons licensed](./LICENSE-docs).
|
||||
|
||||
Examples provided in this repository and in the documentation are [separately licensed](./LICENSE-examples).
|
||||
|
||||
## Troubleshooting
|
||||
See the [Troubleshooting Guide](https://github.com/facebook/react/wiki/Troubleshooting)
|
||||
### More…
|
||||
|
||||
There's only so much we can cram in here. To read more about the community and guidelines for submitting pull requests, please read the [Contributing document](CONTRIBUTING.md).
|
||||
|
||||
51
bin/jsx
Executable file
51
bin/jsx
Executable file
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env node
|
||||
// -*- mode: js -*-
|
||||
'use strict';
|
||||
|
||||
var transform = require('../main').transform;
|
||||
|
||||
require('commoner').version(
|
||||
require('../package.json').version
|
||||
).resolve(function(id) {
|
||||
return this.readModuleP(id);
|
||||
}).option(
|
||||
'--harmony',
|
||||
'Turns on JS transformations such as ES6 Classes etc.'
|
||||
).option(
|
||||
'--target [version]',
|
||||
'Specify your target version of ECMAScript. Valid values are "es3" and ' +
|
||||
'"es5". The default is "es5". "es3" will avoid uses of defineProperty and ' +
|
||||
'will quote reserved words. WARNING: "es5" is not properly supported, even ' +
|
||||
'with the use of es5shim, es5sham. If you need to support IE8, use "es3".',
|
||||
'es5'
|
||||
).option(
|
||||
'--strip-types',
|
||||
'Strips out type annotations.'
|
||||
).option(
|
||||
'--es6module',
|
||||
'Parses the file as a valid ES6 module. ' +
|
||||
'(Note that this means implicit strict mode)'
|
||||
).option(
|
||||
'--non-strict-es6module',
|
||||
'Parses the file as an ES6 module, except disables implicit strict-mode. ' +
|
||||
'(This is useful if you\'re porting non-ES6 modules to ES6, but haven\'t ' +
|
||||
'yet verified that they are strict-mode safe yet)'
|
||||
).option(
|
||||
'--source-map-inline',
|
||||
'Embed inline sourcemap in transformed source'
|
||||
).process(function(id, source) {
|
||||
// This is where JSX, ES6, etc. desugaring happens.
|
||||
// We don't do any pre-processing of options so that the command line and the
|
||||
// JS API both expose the same set of options. We do extract the options that
|
||||
// we care about from commoner though so we aren't passing too many things
|
||||
// along.
|
||||
var options = {
|
||||
harmony: this.options.harmony,
|
||||
sourceMap: this.options.sourceMapInline,
|
||||
stripTypes: this.options.stripTypes,
|
||||
es6module: this.options.es6module,
|
||||
nonStrictEs6module: this.options.nonStrictEs6module,
|
||||
target: this.options.target
|
||||
};
|
||||
return transform(source, options);
|
||||
});
|
||||
57
bin/jsx-internal
Executable file
57
bin/jsx-internal
Executable file
@@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env node
|
||||
// -*- mode: js -*-
|
||||
"use strict";
|
||||
|
||||
var transform = require('../main').transform;
|
||||
var propagate = require("../vendor/constants").propagate;
|
||||
|
||||
require("commoner").version(
|
||||
require("../package.json").version
|
||||
).resolve(function(id) {
|
||||
var context = this;
|
||||
|
||||
// Note that the result of context.getProvidedP() is cached for the
|
||||
// duration of the build, so it is both consistent and cheap to
|
||||
// evaluate multiple times.
|
||||
return context.getProvidedP().then(function(idToPath) {
|
||||
// If a module declares its own identifier using @providesModule
|
||||
// then that identifier will be a key in the idToPath object.
|
||||
if (idToPath.hasOwnProperty(id)) {
|
||||
return context.readFileP(idToPath[id]);
|
||||
}
|
||||
|
||||
// Otherwise assume the identifier maps directly to a path in the
|
||||
// filesystem.
|
||||
return context.readModuleP(id);
|
||||
});
|
||||
|
||||
}).process(function(id, source) {
|
||||
var context = this;
|
||||
var constants = context.config.constants || {};
|
||||
|
||||
// This is where JSX, ES6, etc. desugaring happens.
|
||||
source = transform(source, {harmony: true, stripTypes: true});
|
||||
|
||||
// Constant propagation means removing any obviously dead code after
|
||||
// replacing constant expressions with literal (boolean) values.
|
||||
source = propagate(constants, source);
|
||||
|
||||
if (context.config.mocking) {
|
||||
// Make sure there is exactly one newline at the end of the module.
|
||||
source = source.replace(/\s+$/m, "\n");
|
||||
|
||||
return context.getProvidedP().then(function(idToPath) {
|
||||
if (id !== "mock-modules" &&
|
||||
id !== "mocks" &&
|
||||
id !== "test/all" &&
|
||||
idToPath.hasOwnProperty("mock-modules")) {
|
||||
return source + '\nrequire("mock-modules").register(' +
|
||||
JSON.stringify(id) + ', module);\n';
|
||||
}
|
||||
|
||||
return source;
|
||||
});
|
||||
}
|
||||
|
||||
return source;
|
||||
});
|
||||
51
circle.yml
51
circle.yml
@@ -1,51 +0,0 @@
|
||||
---
|
||||
general:
|
||||
branches:
|
||||
ignore:
|
||||
- gh-pages
|
||||
|
||||
machine:
|
||||
timezone: America/Los_Angeles
|
||||
node:
|
||||
version: 6
|
||||
ruby:
|
||||
version: 2.2.3
|
||||
environment:
|
||||
TRAVIS_REPO_SLUG: facebook/react
|
||||
YARN_VERSION: 0.17.8
|
||||
PATH: "${PATH}:${HOME}/.yarn/bin"
|
||||
|
||||
dependencies:
|
||||
pre:
|
||||
# This is equivalent to $TRAVIS_COMMIT_RANGE
|
||||
# Need to figure out how to bail early if this is a "docs only" build
|
||||
- echo $CIRCLE_COMPARE_URL | cut -d/ -f7
|
||||
# install yarn if it's not already installed
|
||||
- |
|
||||
if [[ ! -e ~/.yarn/bin/yarn || $(yarn --version) != "${YARN_VERSION}" ]]; then
|
||||
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
|
||||
fi
|
||||
override:
|
||||
- bundle install --gemfile=docs/Gemfile --deployment --path=vendor/bundle --jobs=3 --retry=3
|
||||
- yarn install
|
||||
- scripts/circleci/set_up_github_keys.sh
|
||||
post:
|
||||
# - npm ls --depth=0
|
||||
cache_directories:
|
||||
- docs/vendor/bundle
|
||||
- .grunt # Show size comparisons between builds
|
||||
- ~/react-gh-pages # docs checkout
|
||||
- ~/.yarn
|
||||
- ~/.yarn-cache
|
||||
|
||||
test:
|
||||
override:
|
||||
- ./scripts/circleci/test_entry_point.sh:
|
||||
parallel: true
|
||||
|
||||
deployment:
|
||||
staging:
|
||||
branch: /.*/
|
||||
commands:
|
||||
- ./scripts/circleci/upload_build.sh
|
||||
- ./scripts/circleci/build_gh_pages.sh
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
layout: single
|
||||
title: Page Not Found
|
||||
permalink: 404.html
|
||||
---
|
||||
|
||||
We couldn't find what you were looking for.
|
||||
|
||||
16
docs/Gemfile
16
docs/Gemfile
@@ -3,12 +3,11 @@ source 'https://rubygems.org'
|
||||
gem 'rake'
|
||||
|
||||
# jekyll, which builds it all
|
||||
# 3.0 includes sass processing
|
||||
gem 'jekyll', '~>3.1'
|
||||
# 2.0 includes sass processing
|
||||
gem 'jekyll', '~>2.0'
|
||||
|
||||
# Jekyll extensions
|
||||
# Auto redirect pages
|
||||
gem 'jekyll-redirect-from'
|
||||
gem 'jekyll-paginate'
|
||||
|
||||
# JSON
|
||||
gem 'json'
|
||||
@@ -18,12 +17,3 @@ gem 'rb-fsevent'
|
||||
|
||||
# For markdown header cleanup
|
||||
gem 'sanitize', '~>2.0'
|
||||
|
||||
# Markdown
|
||||
gem 'redcarpet'
|
||||
|
||||
# Syntax highlighting
|
||||
gem 'pygments.rb'
|
||||
|
||||
# Avoid having to poll for changes on Windows
|
||||
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
|
||||
@@ -1,70 +1,82 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
blankslate (2.1.2.4)
|
||||
celluloid (0.15.2)
|
||||
timers (~> 1.1.0)
|
||||
classifier (1.3.4)
|
||||
fast-stemmer (>= 1.0.0)
|
||||
coffee-script (2.3.0)
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.7.1)
|
||||
colorator (0.1)
|
||||
ffi (1.9.14)
|
||||
ffi (1.9.14-x64-mingw32)
|
||||
jekyll (3.1.6)
|
||||
execjs (2.2.1)
|
||||
fast-stemmer (1.0.2)
|
||||
ffi (1.9.3)
|
||||
jekyll (2.2.0)
|
||||
classifier (~> 1.3)
|
||||
colorator (~> 0.1)
|
||||
jekyll-coffeescript (~> 1.0)
|
||||
jekyll-gist (~> 1.0)
|
||||
jekyll-paginate (~> 1.0)
|
||||
jekyll-sass-converter (~> 1.0)
|
||||
jekyll-watch (~> 1.1)
|
||||
jekyll-watch (~> 1.0)
|
||||
kramdown (~> 1.3)
|
||||
liquid (~> 3.0)
|
||||
liquid (~> 2.6.1)
|
||||
mercenary (~> 0.3.3)
|
||||
rouge (~> 1.7)
|
||||
pygments.rb (~> 0.6.0)
|
||||
redcarpet (~> 3.1)
|
||||
safe_yaml (~> 1.0)
|
||||
jekyll-paginate (1.1.0)
|
||||
jekyll-redirect-from (0.11.0)
|
||||
jekyll (>= 2.0)
|
||||
jekyll-sass-converter (1.4.0)
|
||||
sass (~> 3.4)
|
||||
jekyll-watch (1.4.0)
|
||||
listen (~> 3.0, < 3.1)
|
||||
json (2.0.1)
|
||||
kramdown (1.11.1)
|
||||
liquid (3.0.6)
|
||||
listen (3.0.8)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
mercenary (0.3.6)
|
||||
mini_portile2 (2.1.0)
|
||||
nokogiri (1.6.8)
|
||||
mini_portile2 (~> 2.1.0)
|
||||
pkg-config (~> 1.1.7)
|
||||
nokogiri (1.6.8-x64-mingw32)
|
||||
mini_portile2 (~> 2.1.0)
|
||||
pkg-config (~> 1.1.7)
|
||||
pkg-config (1.1.7)
|
||||
posix-spawn (0.3.11)
|
||||
pygments.rb (0.6.3)
|
||||
toml (~> 0.1.0)
|
||||
jekyll-coffeescript (1.0.0)
|
||||
coffee-script (~> 2.2)
|
||||
jekyll-gist (1.1.0)
|
||||
jekyll-paginate (1.0.0)
|
||||
jekyll-redirect-from (0.5.0)
|
||||
jekyll (~> 2.0)
|
||||
jekyll-sass-converter (1.2.0)
|
||||
sass (~> 3.2)
|
||||
jekyll-watch (1.1.0)
|
||||
listen (~> 2.7)
|
||||
json (1.8.1)
|
||||
kramdown (1.4.1)
|
||||
liquid (2.6.1)
|
||||
listen (2.7.9)
|
||||
celluloid (>= 0.15.2)
|
||||
rb-fsevent (>= 0.9.3)
|
||||
rb-inotify (>= 0.9)
|
||||
mercenary (0.3.4)
|
||||
mini_portile (0.6.0)
|
||||
nokogiri (1.6.3.1)
|
||||
mini_portile (= 0.6.0)
|
||||
parslet (1.5.0)
|
||||
blankslate (~> 2.0)
|
||||
posix-spawn (0.3.9)
|
||||
pygments.rb (0.6.0)
|
||||
posix-spawn (~> 0.3.6)
|
||||
yajl-ruby (~> 1.2.0)
|
||||
rake (11.2.2)
|
||||
rb-fsevent (0.9.7)
|
||||
rb-inotify (0.9.7)
|
||||
yajl-ruby (~> 1.1.0)
|
||||
rake (10.3.2)
|
||||
rb-fsevent (0.9.4)
|
||||
rb-inotify (0.9.5)
|
||||
ffi (>= 0.5.0)
|
||||
redcarpet (3.3.4)
|
||||
rouge (1.11.1)
|
||||
redcarpet (3.1.2)
|
||||
safe_yaml (1.0.4)
|
||||
sanitize (2.1.0)
|
||||
sanitize (2.0.6)
|
||||
nokogiri (>= 1.4.4)
|
||||
sass (3.4.22)
|
||||
yajl-ruby (1.2.1)
|
||||
sass (3.3.14)
|
||||
timers (1.1.0)
|
||||
toml (0.1.1)
|
||||
parslet (~> 1.5.0)
|
||||
yajl-ruby (1.1.0)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
x64-mingw32
|
||||
|
||||
DEPENDENCIES
|
||||
jekyll (~> 3.1)
|
||||
jekyll-paginate
|
||||
jekyll (~> 2.0)
|
||||
jekyll-redirect-from
|
||||
json
|
||||
pygments.rb
|
||||
rake
|
||||
rb-fsevent
|
||||
redcarpet
|
||||
sanitize (~> 2.0)
|
||||
|
||||
BUNDLED WITH
|
||||
1.11.2
|
||||
|
||||
@@ -8,37 +8,33 @@ If you are working on the site, you will want to install and run a local copy of
|
||||
|
||||
### Dependencies
|
||||
|
||||
In order to use Jekyll, you will need to have Ruby installed. macOS comes pre-installed with Ruby, but you may need to update RubyGems (via `gem update --system`).
|
||||
Otherwise, [RVM](https://rvm.io/) and [rbenv](https://github.com/sstephenson/rbenv) are popular ways to install Ruby.
|
||||
In order to use Jekyll, you will need to have Ruby installed.
|
||||
|
||||
- [Ruby](http://www.ruby-lang.org/) (version >= 1.8.7)
|
||||
- [RubyGems](http://rubygems.org/) (version >= 1.3.7)
|
||||
- [Bundler](http://gembundler.com/)
|
||||
|
||||
The version of the Pygment syntax highlighter used by Jekyll requires Python 2.7.x (not 3.x). macOS comes pre-installed with Python 2.7, but you may need to install it on other OSs.
|
||||
|
||||
- [Python](https://www.python.org) (version 2.7.x)
|
||||
|
||||
Mac OS X comes pre-installed with Ruby, but you may need to update RubyGems (via `gem update --system`).
|
||||
Otherwise, [RVM](https://rvm.io/) and [rbenv](https://github.com/sstephenson/rbenv) are popular ways to install Ruby.
|
||||
Once you have RubyGems and installed Bundler (via `gem install bundler`), use it to install the dependencies:
|
||||
|
||||
```sh
|
||||
$ cd react/docs
|
||||
$ bundle install # Might need sudo.
|
||||
$ npm install
|
||||
$ npm install # Might need sudo.
|
||||
```
|
||||
|
||||
### Instructions
|
||||
|
||||
The site requires React, so first make sure you've built the project (via [`grunt`](http://gruntjs.com/getting-started)).
|
||||
The site requires React, so first make sure you've built the project (via `grunt`).
|
||||
|
||||
Use Jekyll to serve the website locally (by default, at `http://localhost:4000`):
|
||||
|
||||
```sh
|
||||
$ cd react/docs
|
||||
$ bundle exec rake
|
||||
$ bundle exec rake fetch_remotes
|
||||
$ bundle exec jekyll serve -w
|
||||
$ open http://localhost:4000/react/index.html
|
||||
$ open http://localhost:4000/react/
|
||||
```
|
||||
|
||||
We use [SASS](http://sass-lang.com/) (with [Bourbon](http://bourbon.io/)) for our CSS, and we use JSX to transform some of our JS.
|
||||
|
||||
@@ -1,24 +1,15 @@
|
||||
require('rubygems')
|
||||
require('json')
|
||||
require('yaml')
|
||||
require('open-uri')
|
||||
|
||||
desc "download babel-browser"
|
||||
task :fetch_remotes do
|
||||
IO.copy_stream(
|
||||
open('https://unpkg.com/babel-standalone@6.15.0/babel.min.js'),
|
||||
'js/babel.min.js'
|
||||
)
|
||||
end
|
||||
|
||||
desc "generate js from jsx"
|
||||
task :js do
|
||||
system "../node_modules/.bin/babel _js --out-dir=js"
|
||||
system "../bin/jsx --harmony _js js"
|
||||
end
|
||||
|
||||
desc "watch js"
|
||||
task :watch do
|
||||
Process.spawn "../node_modules/.bin/babel _js --out-dir=js --watch"
|
||||
Process.spawn "../bin/jsx --watch --harmony _js js"
|
||||
Process.waitall
|
||||
end
|
||||
|
||||
@@ -32,25 +23,6 @@ task :update_version do
|
||||
end
|
||||
end
|
||||
|
||||
desc "update SRI hashes"
|
||||
task :update_hashes do
|
||||
map = {
|
||||
'react.js' => 'dev',
|
||||
'react.min.js' => 'prod',
|
||||
'react-with-addons.js' => 'addons_dev',
|
||||
'react-with-addons.min.js' => 'addons_prod',
|
||||
'react-dom.js' => 'dom_dev',
|
||||
'react-dom.min.js' => 'dom_prod',
|
||||
'react-dom-server.js' => 'dom_server_dev',
|
||||
'react-dom-server.min.js' => 'dom_server_prod'
|
||||
}
|
||||
site_config = YAML.load_file('_config.yml')
|
||||
map.each do |file, key|
|
||||
site_config['react_hashes'][key] = `openssl dgst -sha384 -binary ../../react-bower/#{file} | openssl base64 -A`
|
||||
end
|
||||
File.open('_config.yml', 'w+') { |f| f.write(site_config.to_yaml) }
|
||||
end
|
||||
|
||||
desc "update acknowledgements list"
|
||||
task :update_acknowledgements do
|
||||
authors = File.readlines('../AUTHORS').map {|author| author.gsub(/ <.*\n/,'')}
|
||||
@@ -61,15 +33,8 @@ task :update_acknowledgements do
|
||||
File.open('_data/acknowledgements.yml', 'w+') { |f| f.write(cols.to_yaml) }
|
||||
end
|
||||
|
||||
desc "copy error codes to docs"
|
||||
task :copy_error_codes do
|
||||
codes_json = File.read('../scripts/error-codes/codes.json')
|
||||
codes_js = "var errorMap = #{codes_json.chomp};\n"
|
||||
File.write('js/errorMap.js', codes_js)
|
||||
end
|
||||
|
||||
desc "build into ../../react-gh-pages"
|
||||
task :release => [:update_version, :js, :fetch_remotes, :copy_error_codes] do
|
||||
task :release => [:update_version, :default] do
|
||||
system "jekyll build -d ../../react-gh-pages"
|
||||
end
|
||||
|
||||
|
||||
@@ -1,48 +1,25 @@
|
||||
---
|
||||
name: React
|
||||
description: A JavaScript library for building user interfaces
|
||||
url: https://facebook.github.io
|
||||
baseurl: /react
|
||||
permalink: /blog/:year/:month/:day/:title.html
|
||||
paginate_path: /blog/page:num/
|
||||
url: http://facebook.github.io
|
||||
baseurl: "/react"
|
||||
permalink: "/blog/:year/:month/:day/:title.html"
|
||||
paginate_path: "/blog/page:num/"
|
||||
relative_permalinks: true
|
||||
paginate: 5
|
||||
timezone: America/Los_Angeles
|
||||
highlighter: pygments
|
||||
defaults:
|
||||
- scope:
|
||||
path: ''
|
||||
type: posts
|
||||
type: post
|
||||
values:
|
||||
layout: post
|
||||
sectionid: blog
|
||||
- scope:
|
||||
path: blog
|
||||
type: pages
|
||||
values:
|
||||
sectionid: blog
|
||||
- scope:
|
||||
path: tutorial
|
||||
type: pages
|
||||
values:
|
||||
layout: tutorial
|
||||
sectionid: tutorial
|
||||
- scope:
|
||||
path: docs
|
||||
type: pages
|
||||
type: page
|
||||
values:
|
||||
layout: docs
|
||||
sectionid: docs
|
||||
- scope:
|
||||
path: contributing
|
||||
type: pages
|
||||
values:
|
||||
sectionid: docs
|
||||
- scope:
|
||||
path: community
|
||||
type: pages
|
||||
values:
|
||||
layout: community
|
||||
sectionid: community
|
||||
exclude:
|
||||
- Gemfile
|
||||
- Gemfile.lock
|
||||
@@ -59,14 +36,4 @@ sass:
|
||||
sass_dir: _css
|
||||
gems:
|
||||
- jekyll-redirect-from
|
||||
- jekyll-paginate
|
||||
react_version: 15.4.0
|
||||
react_hashes:
|
||||
dev: buVLzxzBI8Ps3svVMSUurNdb5dozNidH5Ow4H0YgZeia3t6Oeui2VLpvtAq1fwtK
|
||||
prod: nCjsa0kjNQPQdxWm12/ReVJzfBJaVubEwwDswyQDGMKYJmeWv3qShMuETfU5fisu
|
||||
addons_dev: /u97pKzBwasbC1yj8gSIq1z30o4ZTUX9j1Mv/hyAjmG41ydTNHw9JFOhwFbDgxmR
|
||||
addons_prod: /p86n4b5VTlWoA/INEHQZ+zjx9g1pJduoFmTEJ6fSzFTq1mBaXaBcWVGtZJXD68L
|
||||
dom_dev: lUxkeWjg3I3lXmxcM1gvgo0yvm2w9alc1osa4L8yWZFO6l/vg9h5hSlHPFioltrm
|
||||
dom_prod: u8x1yIGN9IjGNYbBaDMsp1D4MK3sCmMU13mcBX+bm+aMo5+gaT8HIwIj39GlXaRS
|
||||
dom_server_dev: Okj1hVX1VF+oZSkPcJQ/YcnW6bsIpeni222ylwUaMnSmdCe0zWKmMwpFMVqzy4Ws
|
||||
dom_server_prod: wiA4u+G5fEfF4xzhhVnNWeSifVyttoEIpgc3APaMKQgw5A4wHbEMihf63tk1qoyt
|
||||
react_version: 0.13.1
|
||||
|
||||
@@ -37,7 +37,7 @@ html * {
|
||||
border-bottom: 1px dotted #cb4b16;
|
||||
}
|
||||
.cm-s-solarized-light span.cm-keyword {
|
||||
color: #859900;
|
||||
color: #268bd2;
|
||||
}
|
||||
.cm-s-solarized-light span.cm-atom {
|
||||
color: #2aa198;
|
||||
@@ -61,7 +61,7 @@ html * {
|
||||
color: #93a1a1;
|
||||
}
|
||||
.cm-s-solarized-light span.cm-property {
|
||||
color: #657b83;
|
||||
color: #637c84;
|
||||
}
|
||||
.cm-s-solarized-light span.cm-operator {
|
||||
color: #657b83;
|
||||
@@ -74,13 +74,14 @@ html * {
|
||||
border-bottom: 1px dotted #cb4b16;
|
||||
}
|
||||
.cm-s-solarized-light span.cm-bracket {
|
||||
color: #268bd2;
|
||||
color: #cb4b16;
|
||||
}
|
||||
.cm-s-solarized-light span.cm-tag {
|
||||
color: #268bd2;
|
||||
color: #657b83;
|
||||
}
|
||||
.cm-s-solarized-light span.cm-attribute {
|
||||
color: #586e75;
|
||||
font-weight: bold;
|
||||
}
|
||||
.cm-s-solarized-light span.cm-meta {
|
||||
color: #268bd2;
|
||||
@@ -165,6 +166,7 @@ html * {
|
||||
}
|
||||
.cm-s-solarized-dark span.cm-attribute {
|
||||
color: #93a1a1;
|
||||
font-weight: bold;
|
||||
}
|
||||
.cm-s-solarized-dark span.cm-meta {
|
||||
color: #268bd2;
|
||||
|
||||
@@ -68,7 +68,7 @@ h3 {
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 16px;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
h5 {
|
||||
@@ -112,6 +112,8 @@ li {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
a {
|
||||
color: $linkColor;
|
||||
text-decoration: none;
|
||||
@@ -129,7 +131,3 @@ a {
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
input {
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
$side: nth($pos, 2);
|
||||
|
||||
@if $length == 2 { // eg. to top
|
||||
// Swap for backwards compatibility
|
||||
// Swap for backwards compatability
|
||||
$degree: _position-flipper(nth($pos, 2));
|
||||
}
|
||||
@else if $length == 3 { // eg. to top left
|
||||
@@ -38,7 +38,7 @@
|
||||
$spec: to $side $corner;
|
||||
}
|
||||
@else if $length == 1 {
|
||||
// Swap for backwards compatibility
|
||||
// Swap for backwards compatability
|
||||
@if $type == string {
|
||||
$degree: $pos;
|
||||
$spec: to _position-flipper($pos);
|
||||
|
||||
@@ -1,93 +1,46 @@
|
||||
---
|
||||
- - '839'
|
||||
- Aaron Franks
|
||||
- Aaron Gelter
|
||||
- Adam Bloomston
|
||||
- - Aaron Franks
|
||||
- Adam Krebs
|
||||
- Adam Mark
|
||||
- Adam Solove
|
||||
- Adam Timberlake
|
||||
- Adam Zapletal
|
||||
- Ahmad Wali Sidiqi
|
||||
- Alan Plum
|
||||
- Alan Souza
|
||||
- Alan deLevie
|
||||
- Alastair Hole
|
||||
- Alex
|
||||
- Alex Boatwright
|
||||
- Alex Boyd
|
||||
- Alex Dajani
|
||||
- Alex Lopatin
|
||||
- Alex Mykyta
|
||||
- Alex Pien
|
||||
- Alex Smith
|
||||
- Alex Zelenskiy
|
||||
- Alexander Shtuchkin
|
||||
- Alexander Solovyov
|
||||
- Alexander Tseung
|
||||
- Alexandre Gaudencio
|
||||
- Alexey Raspopov
|
||||
- Alexey Shamrin
|
||||
- Ali Ukani
|
||||
- Andre Z Sanchez
|
||||
- Andreas Savvides
|
||||
- Andreas Svensson
|
||||
- Andres Kalle
|
||||
- Andres Suarez
|
||||
- Andrew Clark
|
||||
- Andrew Cobby
|
||||
- Andrew Davey
|
||||
- Andrew Henderson
|
||||
- Andrew Kulakov
|
||||
- Andrew Rasmussen
|
||||
- Andrew Sokolov
|
||||
- Andrew Zich
|
||||
- Andrey Popp
|
||||
- Anthony van der Hoorn
|
||||
- Anto Aravinth
|
||||
- Antonio Ruberto
|
||||
- Antti Ahti
|
||||
- Anuj Tomar
|
||||
- AoDev
|
||||
- April Arcus
|
||||
- Areeb Malik
|
||||
- Aria Buckles
|
||||
- Aria Stewart
|
||||
- Arian Faurtosh
|
||||
- Artem Nezvigin
|
||||
- Austin Wright
|
||||
- Ayman Osman
|
||||
- Baraa Hamodi
|
||||
- Bartosz Kaszubowski
|
||||
- Basarat Ali Syed
|
||||
- Battaile Fauber
|
||||
- Beau Smith
|
||||
- Ben Alpert
|
||||
- Ben Anderson
|
||||
- Ben Brooks
|
||||
- Ben Foxall
|
||||
- Ben Halpern
|
||||
- Ben Jaffe
|
||||
- Ben Moss
|
||||
- Ben Newman
|
||||
- Ben Ripkens
|
||||
- Benjamin Keen
|
||||
- Benjamin Leiken
|
||||
- Benjamin Woodruff
|
||||
- Benjy Cui
|
||||
- Bill Blanchard
|
||||
- Bill Fisher
|
||||
- Blaine Hatab
|
||||
- Blaine Kasten
|
||||
- Bob Eagan
|
||||
- Bob Ralian
|
||||
- Bob Renwick
|
||||
- Bobby
|
||||
- Bojan Mihelac
|
||||
- Bradley Spaulding
|
||||
- Brandon Bloom
|
||||
- Brandon Tilley
|
||||
- Brenard Cubacub
|
||||
- Brian Cooke
|
||||
- Brian Holt
|
||||
- Brian Hsu
|
||||
@@ -98,412 +51,205 @@
|
||||
- Bruno Škvorc
|
||||
- Cam Song
|
||||
- Cam Spiers
|
||||
- Cameron Chamberlain
|
||||
- Cameron Matheson
|
||||
- Carter Chung
|
||||
- Cassus Adam Banko
|
||||
- Cat Chen
|
||||
- Cedric Sohrauer
|
||||
- Cesar William Alvarenga
|
||||
- Changsoon Bok
|
||||
- Charles Marsh
|
||||
- Chase Adams
|
||||
- Cheng Lou
|
||||
- Chitharanjan Das
|
||||
- Chris Bolin
|
||||
- Chris Grovers
|
||||
- Chris Ha
|
||||
- Chris Rebert
|
||||
- Chris Sciolla
|
||||
- Christian
|
||||
- Christian Alfoni
|
||||
- Christian Oliff
|
||||
- Christian Roman
|
||||
- Christoffer Sawicki
|
||||
- Christoph Pojer
|
||||
- Christopher Monsanto
|
||||
- Clay Allsopp
|
||||
- Connor McSheffrey
|
||||
- Conor Hastings
|
||||
- Cory House
|
||||
- Cotton Hou
|
||||
- Craig Akimoto
|
||||
- Cristovao Verstraeten
|
||||
- Damien Pellier
|
||||
- Dan Abramov
|
||||
- Dan Fox
|
||||
- Dan Schafer
|
||||
- Daniel Carlsson
|
||||
- Daniel Cousens
|
||||
- Daniel Friesen
|
||||
- Daniel Gasienica
|
||||
- Daniel Hejl
|
||||
- Daniel Hejl
|
||||
- Daniel Lo Nigro
|
||||
- Daniel Mané
|
||||
- Daniel Miladinov
|
||||
- Daniel Rodgers-Pryor
|
||||
- Daniel Schonfeld
|
||||
- Danny Ben-David
|
||||
- Darcy
|
||||
- Daryl Lau
|
||||
- Darío Javier Cravero
|
||||
- Dave Galbraith
|
||||
- David Baker
|
||||
- David Ed Mellum
|
||||
- David Goldberg
|
||||
- David Granado
|
||||
- David Greenspan
|
||||
- David Hellsing
|
||||
- David Hu
|
||||
- David Khourshid
|
||||
- David Mininger
|
||||
- David Neubauer
|
||||
- David Percy
|
||||
- Dean Shi
|
||||
- Denis Sokolov
|
||||
- Deniss Jacenko
|
||||
- Dennis Johnson
|
||||
- Devon Blandin
|
||||
- Devon Harvey
|
||||
- Dmitrii Abramov
|
||||
- Dmitriy Rozhkov
|
||||
- Dmitry Blues
|
||||
- Dmitry Mazuro
|
||||
- Domenico Matteo
|
||||
- Don Abrams
|
||||
- Dongsheng Liu
|
||||
- Dustan Kasten
|
||||
- Dustin Getz
|
||||
- Dylan Harrington
|
||||
- Eduardo Garcia
|
||||
- Edvin Erikson
|
||||
- Elaine Fang
|
||||
- Enguerran
|
||||
- Eric Clemmons
|
||||
- Eric Eastwood
|
||||
- Eric Florenzano
|
||||
- Eric O'Connell
|
||||
- Eric Schoffstall
|
||||
- Erik Harper
|
||||
- Espen Hovlandsdal
|
||||
- Evan Coonrod
|
||||
- Evan Vosberg
|
||||
- Fabio M. Costa
|
||||
- Federico Rampazzo
|
||||
- Felipe Oliveira Carvalho
|
||||
- Felix Gnass
|
||||
- Felix Kling
|
||||
- Fernando Correia
|
||||
- Frankie Bagnardi
|
||||
- François-Xavier Bois
|
||||
- Fred Zhao
|
||||
- Freddy Rangel
|
||||
- Fyodor Ivanishchev
|
||||
- G Scott Olson
|
||||
- G. Kay Lee
|
||||
- Gabe Levi
|
||||
- Gajus Kuizinas
|
||||
- Gareth Nicholson
|
||||
- Garren Smith
|
||||
- Gavin McQuistin
|
||||
- Geert Pasteels
|
||||
- Geert-Jan Brits
|
||||
- George A Sisco III
|
||||
- Georgii Dolzhykov
|
||||
- Gilbert
|
||||
- Glen Mailer
|
||||
- Grant Timmerman
|
||||
- Greg Hurrell
|
||||
- Greg Perkins
|
||||
- Greg Roodt
|
||||
- Gregory
|
||||
- Guangqiang Dong
|
||||
- Guido Bouman
|
||||
- Harry Hull
|
||||
- Harry Marr
|
||||
- Harry Moreno
|
||||
- - Harry Moreno
|
||||
- Harshad Sabne
|
||||
- Hekar Khani
|
||||
- Hendrik Swanepoel
|
||||
- Henrik Nyh
|
||||
- Henry Wong
|
||||
- Henry Zhu
|
||||
- Hideo Matsumoto
|
||||
- Hou Chia
|
||||
- Huang-Wei Chang
|
||||
- - Hugo Agbonon
|
||||
- Hugo Jobling
|
||||
- Hyeock Kwon
|
||||
- Héliton Nordt
|
||||
- Ian Obermiller
|
||||
- Ignacio Carbajo
|
||||
- Igor Scekic
|
||||
- Ilia Pavlenkov
|
||||
- Ilya Shuklin
|
||||
- Ilyá Belsky
|
||||
- Ingvar Stepanyan
|
||||
- Irae Carvalho
|
||||
- Isaac Salier-Hellendag
|
||||
- Iurii Kucherov
|
||||
- Ivan Kozik
|
||||
- Ivan Krechetov
|
||||
- Ivan Vergiliev
|
||||
- J. Andrew Brassington
|
||||
- J. Renée Beach
|
||||
- JD Isaacks
|
||||
- JJ Weber
|
||||
- JW
|
||||
- Jack Zhang
|
||||
- Jackie Wung
|
||||
- Jacob Gable
|
||||
- Jacob Greenleaf
|
||||
- Jae Hun Ro
|
||||
- Jaeho Lee
|
||||
- Jaime Mingo
|
||||
- Jake Worth
|
||||
- Jakub Malinowski
|
||||
- James
|
||||
- James Brantly
|
||||
- James Burnett
|
||||
- James Friend
|
||||
- James Ide
|
||||
- James Long
|
||||
- James Pearce
|
||||
- James Seppi
|
||||
- James South
|
||||
- James Wen
|
||||
- Jamie Wong
|
||||
- Jamis Charles
|
||||
- Jamison Dance
|
||||
- Jan Hancic
|
||||
- Jan Kassens
|
||||
- Jan Raasch
|
||||
- Jared Forsyth
|
||||
- Jason
|
||||
- Jason Bonta
|
||||
- Jason Ly
|
||||
- Jason Miller
|
||||
- Jason Quense
|
||||
- Jason Trill
|
||||
- Jason Webster
|
||||
- Jay Jaeho Lee
|
||||
- Jean Lauliac
|
||||
- Jed Watson
|
||||
- Jeff Barczewski
|
||||
- Jeff Carpenter
|
||||
- Jeff Chan
|
||||
- Jeff Hicken
|
||||
- Jeff Kolesky
|
||||
- Jeff Morrison
|
||||
- Jeff Welch
|
||||
- Jeffrey Lin
|
||||
- Jeremy Fairbank
|
||||
- Jesse Skinner
|
||||
- Jignesh Kakadiya
|
||||
- Jim OBrien
|
||||
- Jim Sproch
|
||||
- Jimmy Jea
|
||||
- Jing Chen
|
||||
- Jinwoo Oh
|
||||
- Jinxiu Lee
|
||||
- Jiyeon Seo
|
||||
- Jody McIntyre
|
||||
- Joe Critchley
|
||||
- Joe Stein
|
||||
- Joel Auterson
|
||||
- Johannes Baiter
|
||||
- Johannes Emerich
|
||||
- Johannes Lumpe
|
||||
- John Heroy
|
||||
- John Ryan
|
||||
- John Watson
|
||||
- John-David Dalton
|
||||
- Jon Beebe
|
||||
- Jon Chester
|
||||
- Jon Hester
|
||||
- Jon Madison
|
||||
- Jon Scott Clark
|
||||
- Jon Tewksbury
|
||||
- Jonas Enlund
|
||||
- Jonas Gebhardt
|
||||
- Jonathan Hsu
|
||||
- Jonathan Persson
|
||||
- Jordan Harband
|
||||
- Jordan Walke
|
||||
- Jorrit Schippers
|
||||
- Joseph Nudell
|
||||
- Joseph Savona
|
||||
- Josh Bassett
|
||||
- Josh Duck
|
||||
- Josh Perez
|
||||
- Josh Yudaken
|
||||
- Joshua Evans
|
||||
- Joshua Go
|
||||
- Joshua Goldberg
|
||||
- Joshua Ma
|
||||
- João Valente
|
||||
- Juan Serrano
|
||||
- Julen Ruiz Aizpuru
|
||||
- Julian Viereck
|
||||
- Julien Bordellier
|
||||
- Julio Lopez
|
||||
- Jun Wu
|
||||
- Juraj Dudak
|
||||
- Justas Brazauskas
|
||||
- Justin Jaffray
|
||||
- Justin Robison
|
||||
- Justin Woo
|
||||
- Kale
|
||||
- Kamron Batman
|
||||
- Karl Mikkelsen
|
||||
- Karpich Dmitry
|
||||
- Keito Uchiyama
|
||||
- Ken Powers
|
||||
- Kent C. Dodds
|
||||
- Kevin Cheng
|
||||
- Kevin Coughlin
|
||||
- Kevin Huang
|
||||
- Kevin Lau
|
||||
- Kevin Old
|
||||
- Kevin Robinson
|
||||
- Kewei Jiang
|
||||
- Kier Borromeo
|
||||
- KimCoding
|
||||
- Kirk Steven Hansen
|
||||
- Kit Randel
|
||||
- Kohei TAKATA
|
||||
- Koo Youngmin
|
||||
- Krystian Karczewski
|
||||
- Kunal Mehta
|
||||
- Kurt Ruppel
|
||||
- Kyle Kelley
|
||||
- Kyle Mathews
|
||||
- Laurence Rowe
|
||||
- Laurent Etiemble
|
||||
- Lee Byron
|
||||
- Lee Jaeyoung
|
||||
- Lei
|
||||
- Leland Richardson
|
||||
- Leon Fedotov
|
||||
- Leon Yip
|
||||
- Leonardo YongUk Kim
|
||||
- Levi Buzolic
|
||||
- Levi McCallum
|
||||
- Lily
|
||||
- Logan Allen
|
||||
- Lovisa Svallingson
|
||||
- Ludovico Fischer
|
||||
- Luigy Leon
|
||||
- Luke Horvat
|
||||
- MIKAMI Yoshiyuki
|
||||
- Maher Beg
|
||||
- Manas
|
||||
- Marcin K.
|
||||
- Marcin Kwiatkowski
|
||||
- Marcin Szczepanski
|
||||
- Mariano Desanze
|
||||
- Marjan
|
||||
- Mark Anderson
|
||||
- Mark Funk
|
||||
- Mark Hintz
|
||||
- Mark IJbema
|
||||
- Mark Murphy
|
||||
- Mark Richardson
|
||||
- Mark Rushakoff
|
||||
- Mark Sun
|
||||
- Marlon Landaverde
|
||||
- Marshall Roch
|
||||
- Martin Andert
|
||||
- Martin Hujer
|
||||
- Martin Jul
|
||||
- Martin Konicek
|
||||
- Martin Mihaylov
|
||||
- Masaki KOBAYASHI
|
||||
- Mathieu M-Gosselin
|
||||
- Mathieu Savy
|
||||
- Matias Singers
|
||||
- Matsunoki
|
||||
- Matt Brookes
|
||||
- Matt Dunn-Rankin
|
||||
- Matt Harrison
|
||||
- Matt Huggins
|
||||
- Matt Stow
|
||||
- Matt Zabriskie
|
||||
- Matthew Dapena-Tretter
|
||||
- Matthew Herbst
|
||||
- Matthew Hodgson
|
||||
- Matthew Johnston
|
||||
- Matthew King
|
||||
- Matthew Looi
|
||||
- Matthew Miner
|
||||
- Matthias Le Brun
|
||||
- Matti Nelimarkka
|
||||
- Mattijs Kneppers
|
||||
- Max F. Albrecht
|
||||
- Max Heiber
|
||||
- Max Stoiber
|
||||
- Maxi Ferreira
|
||||
- Maxim Abramchuk
|
||||
- Merrick Christensen
|
||||
- Mert Kahyaoğlu
|
||||
- Michael Chan
|
||||
- Michael McDermott
|
||||
- Michael Randers-Pehrson
|
||||
- Michael Ridgway
|
||||
- Michael Warner
|
||||
- Michael Wiencek
|
||||
- Michael Ziwisky
|
||||
- Michal Srb
|
||||
- Michelle Todd
|
||||
- Mihai Parparita
|
||||
- Mike D Pilsbury
|
||||
- Mike Groseclose
|
||||
- Mike Nordick
|
||||
- Mikolaj Dadela
|
||||
- Miles Johnson
|
||||
- Minwe LUO
|
||||
- Miorel Palii
|
||||
- - Morhaus
|
||||
- Moshe Kolodny
|
||||
- Mouad Debbar
|
||||
- Murad
|
||||
- Murray M. Moss
|
||||
- - Mouad Debbar
|
||||
- Nadeesha Cabral
|
||||
- Naman Goel
|
||||
- Nate Hunzaker
|
||||
- Nate Lee
|
||||
- Nathan Smith
|
||||
- Nathan White
|
||||
- Nee
|
||||
- Neri Marschik
|
||||
- Nguyen Truong Duy
|
||||
- Nicholas Bergson-Shilcock
|
||||
- Nicholas Clawson
|
||||
- Nick Balestra
|
||||
- Nick Fitzgerald
|
||||
- Nick Gavalas
|
||||
- Nick Merwin
|
||||
- Nick Presta
|
||||
- Nick Raienko
|
||||
- Nick Thompson
|
||||
- Nick Williams
|
||||
- Niklas Boström
|
||||
- Ning Xia
|
||||
- Niole Nelson
|
||||
- Oiva Eskola
|
||||
- Oleg
|
||||
- Oleksii Markhovskyi
|
||||
- Oliver Zeigermann
|
||||
- Olivier Tassinari
|
||||
- Owen Coutts
|
||||
- Pablo Lacerda de Miranda
|
||||
- Paolo Moretti
|
||||
- Pascal Hartig
|
||||
- Patrick
|
||||
- Patrick Laughlin
|
||||
- Patrick Stapleton
|
||||
- Paul Benigeri
|
||||
- Paul Harper
|
||||
- Paul O’Shannessy
|
||||
- Paul Seiffert
|
||||
- Paul Shen
|
||||
@@ -512,186 +258,87 @@
|
||||
- Peter Blazejewicz
|
||||
- Peter Cottle
|
||||
- Peter Jaros
|
||||
- Peter Newnham
|
||||
- Petri Lehtinen
|
||||
- Petri Lievonen
|
||||
- Pieter Vanderwerff
|
||||
- Pouja Nikray
|
||||
- Prathamesh Sonpatki
|
||||
- Prayag Verma
|
||||
- Preston Parry
|
||||
- Rafael
|
||||
- Rafal Dittwald
|
||||
- Rainer Oviir
|
||||
- Rajat Sehgal
|
||||
- Rajiv Tirumalareddy
|
||||
- Ram Kaniyur
|
||||
- Randall Randall
|
||||
- Ray
|
||||
- Raymond Ha
|
||||
- Reed Loden
|
||||
- Remko Tronçon
|
||||
- Richard D. Worth
|
||||
- Richard Feldman
|
||||
- Richard Kho
|
||||
- Richard Littauer
|
||||
- Richard Livesey
|
||||
- Richard Wood
|
||||
- Rick Beerendonk
|
||||
- Rick Ford
|
||||
- Riley Tomasek
|
||||
- Rob Arnold
|
||||
- Robert Binna
|
||||
- Robert Knight
|
||||
- Robert Sedovsek
|
||||
- Robin Berjon
|
||||
- Robin Frischmann
|
||||
- Roman Pominov
|
||||
- Roman Vanesyan
|
||||
- Russ
|
||||
- Ryan Seddon
|
||||
- Sahat Yalkabov
|
||||
- Saif Hakim
|
||||
- Saiichi Hashimoto
|
||||
- Sam Beveridge
|
||||
- Sam Saccone
|
||||
- Sam Selikoff
|
||||
- Samy Al Zahrani
|
||||
- Sander Spies
|
||||
- Scott Burch
|
||||
- Scott Feeney
|
||||
- Sean Kinsey
|
||||
- Sebastian Markbåge
|
||||
- Sebastian McKenzie
|
||||
- Seoh Char
|
||||
- Sercan Eraslan
|
||||
- Serg
|
||||
- Sergey Generalov
|
||||
- Sergey Rubanov
|
||||
- Seyi Adebajo
|
||||
- Shane O'Sullivan
|
||||
- Shaun Trennery
|
||||
- Sheraz
|
||||
- ShihChi Huang
|
||||
- Shim Won
|
||||
- Shinnosuke Watanabe
|
||||
- Shogun Sea
|
||||
- Shota Kubota
|
||||
- Shripad K
|
||||
- Sibi
|
||||
- Simen Bekkhus
|
||||
- Simon Højberg
|
||||
- Simon Welsh
|
||||
- Simone Vittori
|
||||
- Soichiro Kawamura
|
||||
- Sophia Westwood
|
||||
- Sota Ohara
|
||||
- Spencer Handley
|
||||
- Stefan Dombrowski
|
||||
- Stephen Murphy
|
||||
- Sterling Cobb
|
||||
- Steve Baker
|
||||
- Steven Luscher
|
||||
- Steven Vachon
|
||||
- Stoyan Stefanov
|
||||
- Sundeep Malladi
|
||||
- Sunny Juneja
|
||||
- Sven Helmberger
|
||||
- Sverre Johansen
|
||||
- Sébastien Lorber
|
||||
- Sławomir Laskowski
|
||||
- Taeho Kim
|
||||
- Tay Yang Shun
|
||||
- Ted Kim
|
||||
- Tengfei Guo
|
||||
- Teodor Szente
|
||||
- Thomas Aylott
|
||||
- Thomas Boyt
|
||||
- Thomas Broadley
|
||||
- Thomas Reggi
|
||||
- Thomas Röggla
|
||||
- Thomas Shaddox
|
||||
- Thomas Shafer
|
||||
- ThomasCrvsr
|
||||
- Tienchai Wirojsaksaree
|
||||
- Tim Routowicz
|
||||
- Tim Schaub
|
||||
- Timothy Yung
|
||||
- Timur Carpeev
|
||||
- Tobias Reiss
|
||||
- Tom Duncalf
|
||||
- Tom Haggie
|
||||
- Tom Hauburger
|
||||
- Tom MacWright
|
||||
- Tom Occhino
|
||||
- Tomasz Kołodziejski
|
||||
- Tomoya Suzuki
|
||||
- Tony Spiro
|
||||
- Toru Kobayashi
|
||||
- Trinh Hoang Nhu
|
||||
- Tsung Hung
|
||||
- Tyler Brock
|
||||
- Ustin Zarubin
|
||||
- Vadim Chernysh
|
||||
- Varun Rau
|
||||
- Vasiliy Loginevskiy
|
||||
- Victor Alvarez
|
||||
- Victor Homyakov
|
||||
- Victor Koenders
|
||||
- Ville Immonen
|
||||
- Vincent Riemer
|
||||
- Vincent Siao
|
||||
- Vipul A M
|
||||
- Vitaly Kramskikh
|
||||
- Vitor Balocco
|
||||
- Vjeux
|
||||
- Volkan Unsal
|
||||
- Wander Wang
|
||||
- Wayne Larsen
|
||||
- WickyNilliams
|
||||
- Wincent Colaiuta
|
||||
- Wout Mertens
|
||||
- Xavier Morel
|
||||
- XuefengWu
|
||||
- Yakov Dalinchuk
|
||||
- Yasar icli
|
||||
- YouBao Nong
|
||||
- Yuichi Hagio
|
||||
- Yuriy Dybskiy
|
||||
- Yutaka Nakajima
|
||||
- Yuval Dekel
|
||||
- Zach Bruggeman
|
||||
- Zach Ramaekers
|
||||
- Zacharias
|
||||
- Zeke Sikelianos
|
||||
- Zhangjd
|
||||
- adraeth
|
||||
- arush
|
||||
- brafdlog
|
||||
- chen
|
||||
- clariroid
|
||||
- claudiopro
|
||||
- cutbko
|
||||
- davidxi
|
||||
- dongmeng.ldm
|
||||
- iamchenxin
|
||||
- iamdoron
|
||||
- iawia002
|
||||
- imagentleman
|
||||
- koh-taka
|
||||
- kohashi85
|
||||
- laiso
|
||||
- leeyoungalias
|
||||
- li.li
|
||||
- maxprafferty
|
||||
- rgarifullin
|
||||
- songawee
|
||||
- sugarshin
|
||||
- wali-s
|
||||
- yiminghe
|
||||
- youmoo
|
||||
- zhangjg
|
||||
- zwhitchcox
|
||||
- "Árni Hermann Reynisson"
|
||||
- "元彦"
|
||||
- "凌恒"
|
||||
- "张敏"
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
# Map of short name to more information. `name` will be used but if you don't
|
||||
# want to use your real name, just use whatever. If url is included, your name
|
||||
# will be a link to the provided url.
|
||||
benigeri:
|
||||
name: Paul Benigeri
|
||||
url: https://github.com/benigeri
|
||||
chenglou:
|
||||
name: Cheng Lou
|
||||
url: https://twitter.com/_chenglou
|
||||
Daniel15:
|
||||
name: Daniel Lo Nigro
|
||||
url: http://dan.cx/
|
||||
fisherwebdev:
|
||||
name: Bill Fisher
|
||||
url: https://twitter.com/fisherwebdev
|
||||
gaearon:
|
||||
name: Dan Abramov
|
||||
url: https://twitter.com/dan_abramov
|
||||
jaredly:
|
||||
name: Jared Forsyth
|
||||
url: https://twitter.com/jaredforsyth
|
||||
jgebhardt:
|
||||
name: Jonas Gebhardt
|
||||
url: https://twitter.com/jonasgebhardt
|
||||
jimfb:
|
||||
name: Jim Sproch
|
||||
url: http://www.jimsproch.com
|
||||
jingc:
|
||||
name: Jing Chen
|
||||
url: https://twitter.com/jingc
|
||||
josephsavona:
|
||||
name: Joseph Savona
|
||||
url: https://twitter.com/en_JS
|
||||
keyanzhang:
|
||||
name: Keyan Zhang
|
||||
url: https://twitter.com/keyanzhang
|
||||
kmeht:
|
||||
name: Kunal Mehta
|
||||
url: https://github.com/kmeht
|
||||
LoukaN:
|
||||
name: Lou Husson
|
||||
url: https://twitter.com/loukan42
|
||||
matthewjohnston4:
|
||||
name: Matthew Johnston
|
||||
url: https://github.com/matthewathome
|
||||
petehunt:
|
||||
name: Pete Hunt
|
||||
url: https://twitter.com/floydophone
|
||||
schrockn:
|
||||
name: Nick Schrock
|
||||
url: https://twitter.com/schrockn
|
||||
sebmarkbage:
|
||||
name: Sebastian Markbåge
|
||||
url: https://twitter.com/sebmarkbage
|
||||
spicyj:
|
||||
name: Ben Alpert
|
||||
url: http://benalpert.com
|
||||
steveluscher:
|
||||
name: Steven Luscher
|
||||
url: https://twitter.com/steveluscher
|
||||
vjeux:
|
||||
name: Vjeux
|
||||
url: https://twitter.com/vjeux
|
||||
wincent:
|
||||
name: Greg Hurrell
|
||||
url: https://twitter.com/wincent
|
||||
zpao:
|
||||
name: Paul O’Shannessy
|
||||
url: https://twitter.com/zpao
|
||||
@@ -1,14 +0,0 @@
|
||||
- title: Community Resources
|
||||
items:
|
||||
- id: support
|
||||
title: Where To Get Support
|
||||
- id: conferences
|
||||
title: Conferences
|
||||
- id: videos
|
||||
title: Videos
|
||||
- id: complementary-tools
|
||||
title: Complementary Tools
|
||||
href: https://github.com/facebook/react/wiki/Complementary-Tools
|
||||
- id: examples
|
||||
title: Examples
|
||||
href: https://github.com/facebook/react/wiki/Examples
|
||||
@@ -1,10 +0,0 @@
|
||||
- title: Contributing
|
||||
items:
|
||||
- id: how-to-contribute
|
||||
title: How to Contribute
|
||||
- id: codebase-overview
|
||||
title: Codebase Overview
|
||||
- id: implementation-notes
|
||||
title: Implementation Notes
|
||||
- id: design-principles
|
||||
title: Design Principles
|
||||
@@ -1,86 +1,99 @@
|
||||
- title: Quick Start
|
||||
items:
|
||||
- id: installation
|
||||
title: Installation
|
||||
- id: hello-world
|
||||
title: Hello World
|
||||
- id: introducing-jsx
|
||||
title: Introducing JSX
|
||||
- id: rendering-elements
|
||||
title: Rendering Elements
|
||||
- id: components-and-props
|
||||
title: Components and Props
|
||||
- id: state-and-lifecycle
|
||||
title: State and Lifecycle
|
||||
- id: handling-events
|
||||
title: Handling Events
|
||||
- id: conditional-rendering
|
||||
title: Conditional Rendering
|
||||
- id: lists-and-keys
|
||||
title: Lists and Keys
|
||||
- id: forms
|
||||
title: Forms
|
||||
- id: lifting-state-up
|
||||
title: Lifting State Up
|
||||
- id: composition-vs-inheritance
|
||||
title: Composition vs Inheritance
|
||||
- id: thinking-in-react
|
||||
title: Thinking In React
|
||||
- title: Advanced Guides
|
||||
- id: getting-started
|
||||
title: Getting Started
|
||||
- id: tutorial
|
||||
title: Tutorial
|
||||
- id: thinking-in-react
|
||||
title: Thinking in React
|
||||
- title: Community Resources
|
||||
items:
|
||||
- id: conferences
|
||||
title: Conferences
|
||||
- id: videos
|
||||
title: Videos
|
||||
- id: complementary-tools
|
||||
title: Complementary Tools
|
||||
- id: examples
|
||||
title: Examples
|
||||
- title: Guides
|
||||
items:
|
||||
- id: why-react
|
||||
title: Why React?
|
||||
- id: displaying-data
|
||||
title: Displaying Data
|
||||
subitems:
|
||||
- id: jsx-in-depth
|
||||
title: JSX In Depth
|
||||
- id: typechecking-with-proptypes
|
||||
title: Typechecking With PropTypes
|
||||
- id: refs-and-the-dom
|
||||
title: Refs and the DOM
|
||||
- id: uncontrolled-components
|
||||
title: Uncontrolled Components
|
||||
- id: optimizing-performance
|
||||
title: Optimizing Performance
|
||||
- id: react-without-es6
|
||||
title: React Without ES6
|
||||
- id: react-without-jsx
|
||||
title: React Without JSX
|
||||
- id: reconciliation
|
||||
title: Reconciliation
|
||||
- id: context
|
||||
title: Context
|
||||
- id: web-components
|
||||
title: Web Components
|
||||
- id: higher-order-components
|
||||
title: Higher-Order Components
|
||||
title: JSX in Depth
|
||||
- id: jsx-spread
|
||||
title: JSX Spread Attributes
|
||||
- id: jsx-gotchas
|
||||
title: JSX Gotchas
|
||||
- id: interactivity-and-dynamic-uis
|
||||
title: Interactivity and Dynamic UIs
|
||||
- id: multiple-components
|
||||
title: Multiple Components
|
||||
- id: reusable-components
|
||||
title: Reusable Components
|
||||
- id: transferring-props
|
||||
title: Transferring Props
|
||||
- id: forms
|
||||
title: Forms
|
||||
- id: working-with-the-browser
|
||||
title: Working With the Browser
|
||||
subitems:
|
||||
- id: more-about-refs
|
||||
title: More About Refs
|
||||
- id: tooling-integration
|
||||
title: Tooling Integration
|
||||
- id: addons
|
||||
title: Add-Ons
|
||||
subitems:
|
||||
- id: animation
|
||||
title: Animation
|
||||
- id: two-way-binding-helpers
|
||||
title: Two-Way Binding Helpers
|
||||
- id: class-name-manipulation
|
||||
title: Class Name Manipulation
|
||||
- id: test-utils
|
||||
title: Test Utilities
|
||||
- id: clone-with-props
|
||||
title: Cloning Components
|
||||
- id: create-fragment
|
||||
title: Keyed Fragments
|
||||
- id: update
|
||||
title: Immutability Helpers
|
||||
- id: pure-render-mixin
|
||||
title: PureRenderMixin
|
||||
- id: perf
|
||||
title: Performance Tools
|
||||
- id: advanced-performance
|
||||
title: Advanced Performance
|
||||
- title: Reference
|
||||
items:
|
||||
- id: react-api
|
||||
title: React
|
||||
subitems:
|
||||
- id: react-component
|
||||
title: React.Component
|
||||
- id: react-dom
|
||||
title: ReactDOM
|
||||
- id: react-dom-server
|
||||
title: ReactDOMServer
|
||||
- id: dom-elements
|
||||
title: DOM Elements
|
||||
- id: events
|
||||
title: SyntheticEvent
|
||||
- id: addons
|
||||
title: Add-Ons
|
||||
subitems:
|
||||
- id: perf
|
||||
title: Performance Tools
|
||||
- id: test-utils
|
||||
title: Test Utilities
|
||||
- id: animation
|
||||
title: Animation
|
||||
- id: create-fragment
|
||||
title: Keyed Fragments
|
||||
- id: update
|
||||
title: Immutability Helpers
|
||||
- id: pure-render-mixin
|
||||
title: PureRenderMixin
|
||||
- id: shallow-compare
|
||||
title: Shallow Compare
|
||||
- id: two-way-binding-helpers
|
||||
title: Two-way Binding Helpers
|
||||
- id: top-level-api
|
||||
title: Top-Level API
|
||||
- id: component-api
|
||||
title: Component API
|
||||
- id: component-specs
|
||||
title: Component Specs and Lifecycle
|
||||
- id: tags-and-attributes
|
||||
title: Supported Tags and Attributes
|
||||
- id: events
|
||||
title: Event System
|
||||
- id: dom-differences
|
||||
title: DOM Differences
|
||||
- id: special-non-dom-attributes
|
||||
title: Special Non-DOM Attributes
|
||||
- id: reconciliation
|
||||
title: Reconciliation
|
||||
- id: glossary
|
||||
title: React (Virtual) DOM Terminology
|
||||
- title: Flux
|
||||
items:
|
||||
- id: flux-overview
|
||||
title: Flux Overview
|
||||
href: http://facebook.github.io/flux/docs/overview.html
|
||||
- id: flux-todo-list
|
||||
title: Flux TodoMVC Tutorial
|
||||
href: http://facebook.github.io/flux/docs/todo-list.html
|
||||
|
||||
40
docs/_data/nav_tips.yml
Normal file
40
docs/_data/nav_tips.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
- title: Tips
|
||||
items:
|
||||
- id: introduction
|
||||
title: Introduction
|
||||
- id: inline-styles
|
||||
title: Inline Styles
|
||||
- id: if-else-in-JSX
|
||||
title: If-Else in JSX
|
||||
- id: self-closing-tag
|
||||
title: Self-Closing Tag
|
||||
- id: maximum-number-of-jsx-root-nodes
|
||||
title: Maximum Number of JSX Root Nodes
|
||||
- id: style-props-value-px
|
||||
title: Shorthand for Specifying Pixel Values in style props
|
||||
- id: children-props-type
|
||||
title: Type of the Children props
|
||||
- id: controlled-input-null-value
|
||||
title: Value of null for Controlled Input
|
||||
- id: componentWillReceiveProps-not-triggered-after-mounting
|
||||
title: componentWillReceiveProps Not Triggered After Mounting
|
||||
- id: props-in-getInitialState-as-anti-pattern
|
||||
title: Props in getInitialState Is an Anti-Pattern
|
||||
- id: dom-event-listeners
|
||||
title: DOM Event Listeners in a Component
|
||||
- id: initial-ajax
|
||||
title: Load Initial Data via AJAX
|
||||
- id: false-in-jsx
|
||||
title: False in JSX
|
||||
- id: communicate-between-components
|
||||
title: Communicate Between Components
|
||||
- id: expose-component-functions
|
||||
title: Expose Component Functions
|
||||
- id: references-to-components
|
||||
title: References to Components
|
||||
- id: children-undefined
|
||||
title: this.props.children undefined
|
||||
- id: use-react-with-other-libraries
|
||||
title: Use React with Other Libraries
|
||||
- id: dangerously-set-inner-html
|
||||
title: Dangerously Set innerHTML
|
||||
@@ -1,71 +0,0 @@
|
||||
- title: Tutorial
|
||||
items:
|
||||
- id: tutorial
|
||||
title: Overview
|
||||
subitems:
|
||||
- id: what-were-building
|
||||
title: What We're Building
|
||||
href: /react/tutorial/tutorial.html#what-were-building
|
||||
forceInternal: true
|
||||
- id: what-is-react
|
||||
title: What is React?
|
||||
href: /react/tutorial/tutorial.html#what-is-react
|
||||
forceInternal: true
|
||||
- id: getting-started
|
||||
title: Getting Started
|
||||
href: /react/tutorial/tutorial.html#getting-started
|
||||
forceInternal: true
|
||||
- id: passing-data-through-props
|
||||
title: Passing Data Through Props
|
||||
href: /react/tutorial/tutorial.html#passing-data-through-props
|
||||
forceInternal: true
|
||||
- id: an-interactive-component
|
||||
title: An Interactive Component
|
||||
href: /react/tutorial/tutorial.html#an-interactive-component
|
||||
forceInternal: true
|
||||
- id: developer-tools
|
||||
title: Developer Tools
|
||||
href: /react/tutorial/tutorial.html#developer-tools
|
||||
forceInternal: true
|
||||
- id: lifting-state-up
|
||||
title: Lifting State Up
|
||||
href: /react/tutorial/tutorial.html#lifting-state-up
|
||||
forceInternal: true
|
||||
subitems:
|
||||
- id: why-immutability-is-important
|
||||
title: Why Immutability Is Important
|
||||
href: /react/tutorial/tutorial.html#why-immutability-is-important
|
||||
forceInternal: true
|
||||
- id: functional-components
|
||||
title: Functional Components
|
||||
href: /react/tutorial/tutorial.html#functional-components
|
||||
forceInternal: true
|
||||
- id: taking-turns
|
||||
title: Taking Turns
|
||||
href: /react/tutorial/tutorial.html#taking-turns
|
||||
forceInternal: true
|
||||
- id: declaring-a-winner
|
||||
title: Declaring a Winner
|
||||
href: /react/tutorial/tutorial.html#declaring-a-winner
|
||||
forceInternal: true
|
||||
- id: storing-a-history
|
||||
title: Storing A History
|
||||
href: /react/tutorial/tutorial.html#storing-a-history
|
||||
forceInternal: true
|
||||
subitems:
|
||||
- id: showing-the-moves
|
||||
title: Showing the Moves
|
||||
href: /react/tutorial/tutorial.html#showing-the-moves
|
||||
forceInternal: true
|
||||
- id: keys
|
||||
title: Keys
|
||||
href: /react/tutorial/tutorial.html#keys
|
||||
forceInternal: true
|
||||
- id: implementing-time-travel
|
||||
title: Implementing Time Travel
|
||||
href: /react/tutorial/tutorial.html#implementing-time-travel
|
||||
forceInternal: true
|
||||
- id: wrapping-up
|
||||
title: Wrapping Up
|
||||
href: /react/tutorial/tutorial.html#wrapping-up
|
||||
forceInternal: true
|
||||
@@ -1,32 +1,10 @@
|
||||
{% assign page = include.page %}
|
||||
<h1><a href="/react{{ page.url }}">{{ page.title }}</a></h1>
|
||||
<p class="meta">{{ page.date | date_to_string }} by {{ page.author }}</p>
|
||||
|
||||
<h1>
|
||||
{% if include.isPermalink %}
|
||||
{{ page.title }}
|
||||
<div id="post">
|
||||
{% if content != '' %}
|
||||
{{ page.excerpt }}
|
||||
{% else %}
|
||||
<a href="/react{{ page.url }}">{{ page.title }}</a>
|
||||
{{ page.content }}
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
<p class="meta">
|
||||
{{ page.date | date: "%B %e, %Y" }}
|
||||
by
|
||||
{% for author in page.authors %}
|
||||
{% if author.url %}
|
||||
<a href="{{author.url}}">{{ author.name }}</a>
|
||||
{% else %}
|
||||
{{ author.name }}
|
||||
{% endif %}
|
||||
{% if forloop.last == false %} and {% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="post">
|
||||
{{ include.content }}
|
||||
</div>
|
||||
|
||||
{% if include.isPermalink %}
|
||||
<div class="fb-like" data-send="true" data-width="650" data-show-faces="false"></div>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
<footer class="nav-footer">
|
||||
<section class="sitemap">
|
||||
<a href="/react/" class="nav-home">
|
||||
</a>
|
||||
<div>
|
||||
<h5><a href="/react/docs/">Docs</a></h5>
|
||||
<a href="/react/docs/hello-world.html">Quick Start</a>
|
||||
<a href="/react/docs/thinking-in-react.html">Thinking in React</a>
|
||||
<a href="/react/tutorial/tutorial.html">Tutorial</a>
|
||||
<a href="/react/docs/jsx-in-depth.html">Advanced Guides</a>
|
||||
</div>
|
||||
<div>
|
||||
<h5><a href="/react/community/support.html">Community</a></h5>
|
||||
<a href="http://stackoverflow.com/questions/tagged/reactjs" target="_blank">Stack Overflow</a>
|
||||
<a href="https://discuss.reactjs.org/" target="_blank">Discussion Forum</a>
|
||||
<a href="https://discord.gg/0ZcbPKXt5bZjGY5n" target="_blank">Reactiflux Chat</a>
|
||||
<a href="https://www.facebook.com/react" target="_blank">Facebook</a>
|
||||
<a href="https://twitter.com/reactjs" target="_blank">Twitter</a>
|
||||
</div>
|
||||
<div>
|
||||
<h5><a href="/react/community/support.html">Resources</a></h5>
|
||||
<a href="/react/community/conferences.html">Conferences</a>
|
||||
<a href="/react/community/videos.html">Videos</a>
|
||||
<a href="https://github.com/facebook/react/wiki/Examples" target="_blank">Examples</a>
|
||||
<a href="https://github.com/facebook/react/wiki/Complementary-Tools" target="_blank">Complementary Tools</a>
|
||||
</div>
|
||||
<div>
|
||||
<h5>More</h5>
|
||||
<a href="/react/blog/">Blog</a>
|
||||
<a href="https://github.com/facebook/react" target="_blank">GitHub</a>
|
||||
<a href="http://facebook.github.io/react-native/" target="_blank">React Native</a>
|
||||
<a href="/react/acknowledgements.html">Acknowledgements</a>
|
||||
</div>
|
||||
</section>
|
||||
<a href="https://code.facebook.com/projects/" target="_blank" class="fbOpenSource">
|
||||
<img src="/react/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/>
|
||||
</a>
|
||||
<section class="copyright">
|
||||
Copyright © {{ site.time | date: '%Y' }} Facebook Inc.
|
||||
</section>
|
||||
</footer>
|
||||
@@ -1,13 +0,0 @@
|
||||
<div class="hero">
|
||||
<div class="wrap">
|
||||
<div class="text"><strong>React</strong></div>
|
||||
<div class="minitext">
|
||||
A JavaScript library for building user interfaces
|
||||
</div>
|
||||
|
||||
<div class="buttons-unit">
|
||||
<a href="/react/docs/hello-world.html" class="button">Get Started</a>
|
||||
<a href="/react/tutorial/tutorial.html" class="button">Take the Tutorial</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,24 +0,0 @@
|
||||
<div class="nav-docs">
|
||||
<!-- Community Nav -->
|
||||
{% for section in site.data.nav_community %}
|
||||
<div class="nav-docs-section">
|
||||
<h3>{{ section.title }}</h3>
|
||||
<ul>
|
||||
{% for item in section.items %}
|
||||
<li>
|
||||
{{ item | community_sidebar_link }}
|
||||
{% if item.subitems %}
|
||||
<ul>
|
||||
{% for subitem in item.subitems %}
|
||||
<li>
|
||||
{{ subitem | community_sidebar_link }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -6,12 +6,12 @@
|
||||
<ul>
|
||||
{% for item in section.items %}
|
||||
<li>
|
||||
{{ item | docs_sidebar_link}}
|
||||
{{ item | sidebar_item_link}}
|
||||
{% if item.subitems %}
|
||||
<ul>
|
||||
{% for subitem in item.subitems %}
|
||||
<li>
|
||||
{{ subitem | docs_sidebar_link }}
|
||||
{{ subitem | sidebar_item_link}}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@@ -22,18 +22,17 @@
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<!-- Contributing Nav -->
|
||||
{% for section in site.data.nav_contributing %}
|
||||
<!-- Tips Nav -->
|
||||
{% for section in site.data.nav_tips %}
|
||||
<div class="nav-docs-section">
|
||||
<h3>{{ section.title }}</h3>
|
||||
<ul>
|
||||
{% for item in section.items %}
|
||||
<li>
|
||||
<a href="/react/contributing/{{ item.id }}.html"{% if page.id == item.id %} class="active"{% endif %}>{{ item.title }}</a>
|
||||
<a href="/react/tips/{{ item.id }}.html"{% if page.id == item.id %} class="active"{% endif %}>{{ item.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
<div class="nav-docs">
|
||||
<!-- Tutorial Nav -->
|
||||
{% for section in site.data.nav_tutorial %}
|
||||
<div class="nav-docs-section">
|
||||
<h3>{{ section.title }}</h3>
|
||||
<ul>
|
||||
{% for item in section.items %}
|
||||
<li>
|
||||
{{ item | tutorial_sidebar_link }}
|
||||
{% if item.subitems %}
|
||||
<ul>
|
||||
{% for subitem in item.subitems %}
|
||||
<li>
|
||||
{{ subitem | tutorial_sidebar_link }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -1,23 +0,0 @@
|
||||
<div class="nav-main">
|
||||
<div class="wrap">
|
||||
<a class="nav-home" href="/react/">
|
||||
<img class="nav-logo" src="/react/img/logo.svg" width="36" height="36">
|
||||
React
|
||||
</a>
|
||||
<div class="nav-lists">
|
||||
<ul class="nav-site nav-site-internal">
|
||||
<li><a href="/react/docs/hello-world.html"{% if page.sectionid == 'docs' or page.sectionid == 'tips' or page.sectionid == 'contributing' %} class="active"{% endif %}>Docs</a></li>
|
||||
<li><a href="/react/tutorial/tutorial.html"{% if page.sectionid == 'tutorial' %} class="active"{% endif %}>Tutorial</a></li>
|
||||
<li><a href="/react/community/support.html"{% if page.sectionid == 'community' %} class="active"{% endif %}>Community</a></li>
|
||||
<li><a href="/react/blog/"{% if page.sectionid == 'blog' %} class="active"{% endif %}>Blog</a></li>
|
||||
<li class="nav-site-search">
|
||||
<input id="algolia-doc-search" type="text" placeholder="Search docs..." />
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav-site nav-site-external">
|
||||
<li><a href="https://github.com/facebook/react">GitHub</a></li>
|
||||
<li><a href="https://github.com/facebook/react/releases">v{{site.react_version}}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,111 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
/* global React ReactDOM errorMap:true */
|
||||
'use strict';
|
||||
|
||||
function replaceArgs(msg, argList) {
|
||||
let argIdx = 0;
|
||||
return msg.replace(/%s/g, function() {
|
||||
const arg = argList[argIdx++];
|
||||
return arg === undefined ? '[missing argument]' : arg;
|
||||
});
|
||||
}
|
||||
|
||||
function urlify(str) {
|
||||
const urlRegex = /(https:\/\/fb\.me\/[a-z\-]+)/g;
|
||||
|
||||
const segments = str.split(urlRegex);
|
||||
|
||||
for (let i = 0; i < segments.length; i++) {
|
||||
if (i % 2 === 1) {
|
||||
segments[i] = (<a key={i} target="_blank" href={segments[i]}>{segments[i]}</a>);
|
||||
}
|
||||
}
|
||||
|
||||
return segments;
|
||||
}
|
||||
|
||||
// ?invariant=123&args[]=foo&args[]=bar
|
||||
function parseQueryString() {
|
||||
const rawQueryString = window.location.search.substring(1);
|
||||
if (!rawQueryString) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let code = '';
|
||||
let args = [];
|
||||
|
||||
const queries = rawQueryString.split('&');
|
||||
for (let i = 0; i < queries.length; i++) {
|
||||
const query = decodeURIComponent(queries[i]);
|
||||
if (query.indexOf('invariant=') === 0) {
|
||||
code = query.slice(10);
|
||||
} else if (query.indexOf('args[]=') === 0) {
|
||||
args.push(query.slice(7));
|
||||
}
|
||||
}
|
||||
|
||||
return [code, args];
|
||||
}
|
||||
|
||||
function ErrorResult(props) {
|
||||
const code = props.code;
|
||||
const errorMsg = props.msg;
|
||||
|
||||
if (!code) {
|
||||
return (
|
||||
<p>When you encounter an error, you'll receive a link to this page for that specific error and we'll show you the full error text.</p>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<p>The full text of the error you just encountered is:</p>
|
||||
<code>{urlify(errorMsg)}</code>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
class ErrorDecoder extends React.Component {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
|
||||
this.state = {
|
||||
code: null,
|
||||
errorMsg: '',
|
||||
};
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
const parseResult = parseQueryString();
|
||||
if (parseResult != null) {
|
||||
const [code, args] = parseResult;
|
||||
if (errorMap[code]) {
|
||||
this.setState({
|
||||
code: code,
|
||||
errorMsg: replaceArgs(errorMap[code], args),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<ErrorResult
|
||||
code={this.state.code}
|
||||
msg={this.state.errorMsg}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
ReactDOM.render(
|
||||
<ErrorDecoder />,
|
||||
document.querySelector('.error-decoder-container')
|
||||
);
|
||||
@@ -1,7 +1,3 @@
|
||||
---
|
||||
rules:
|
||||
block-scoped-var: 0
|
||||
no-undef: 0
|
||||
strict: 0
|
||||
react/react-in-jsx-scope: 0
|
||||
react/jsx-no-undef: 0
|
||||
block-scoped-var: false
|
||||
no-undef: false
|
||||
@@ -1,15 +1,14 @@
|
||||
var name = Math.random() > 0.5 ? 'Jane' : 'John';
|
||||
var HELLO_COMPONENT = `
|
||||
class HelloMessage extends React.Component {
|
||||
render() {
|
||||
var HelloMessage = React.createClass({
|
||||
render: function() {
|
||||
return <div>Hello {this.props.name}</div>;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
ReactDOM.render(<HelloMessage name="${name}" />, mountNode);
|
||||
`.trim();
|
||||
React.render(<HelloMessage name="John" />, mountNode);
|
||||
`;
|
||||
|
||||
ReactDOM.render(
|
||||
React.render(
|
||||
<ReactPlayground codeText={HELLO_COMPONENT} />,
|
||||
document.getElementById('helloExample')
|
||||
);
|
||||
|
||||
@@ -1,21 +1,12 @@
|
||||
var MARKDOWN_COMPONENT = `
|
||||
class MarkdownEditor extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.handleChange = this.handleChange.bind(this);
|
||||
this.state = {value: 'Type some *markdown* here!'};
|
||||
}
|
||||
|
||||
handleChange() {
|
||||
this.setState({value: this.refs.textarea.value});
|
||||
}
|
||||
|
||||
getRawMarkup() {
|
||||
var md = new Remarkable();
|
||||
return { __html: md.render(this.state.value) };
|
||||
}
|
||||
|
||||
render() {
|
||||
var MarkdownEditor = React.createClass({
|
||||
getInitialState: function() {
|
||||
return {value: 'Type some *markdown* here!'};
|
||||
},
|
||||
handleChange: function() {
|
||||
this.setState({value: React.findDOMNode(this.refs.textarea).value});
|
||||
},
|
||||
render: function() {
|
||||
return (
|
||||
<div className="MarkdownEditor">
|
||||
<h3>Input</h3>
|
||||
@@ -26,17 +17,19 @@ class MarkdownEditor extends React.Component {
|
||||
<h3>Output</h3>
|
||||
<div
|
||||
className="content"
|
||||
dangerouslySetInnerHTML={this.getRawMarkup()}
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: marked(this.state.value, {sanitize: true})
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
ReactDOM.render(<MarkdownEditor />, mountNode);
|
||||
`.trim();
|
||||
React.render(<MarkdownEditor />, mountNode);
|
||||
`;
|
||||
|
||||
ReactDOM.render(
|
||||
React.render(
|
||||
<ReactPlayground codeText={MARKDOWN_COMPONENT} />,
|
||||
document.getElementById('markdownExample')
|
||||
);
|
||||
|
||||
@@ -1,35 +1,28 @@
|
||||
var TIMER_COMPONENT = `
|
||||
class Timer extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {secondsElapsed: 0};
|
||||
}
|
||||
|
||||
tick() {
|
||||
this.setState((prevState) => ({
|
||||
secondsElapsed: prevState.secondsElapsed + 1
|
||||
}));
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.interval = setInterval(() => this.tick(), 1000);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
var Timer = React.createClass({
|
||||
getInitialState: function() {
|
||||
return {secondsElapsed: 0};
|
||||
},
|
||||
tick: function() {
|
||||
this.setState({secondsElapsed: this.state.secondsElapsed + 1});
|
||||
},
|
||||
componentDidMount: function() {
|
||||
this.interval = setInterval(this.tick, 1000);
|
||||
},
|
||||
componentWillUnmount: function() {
|
||||
clearInterval(this.interval);
|
||||
}
|
||||
|
||||
render() {
|
||||
},
|
||||
render: function() {
|
||||
return (
|
||||
<div>Seconds Elapsed: {this.state.secondsElapsed}</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
ReactDOM.render(<Timer />, mountNode);
|
||||
`.trim();
|
||||
React.render(<Timer />, mountNode);
|
||||
`;
|
||||
|
||||
ReactDOM.render(
|
||||
React.render(
|
||||
<ReactPlayground codeText={TIMER_COMPONENT} />,
|
||||
document.getElementById('timerExample')
|
||||
);
|
||||
|
||||
@@ -1,58 +1,43 @@
|
||||
var TODO_COMPONENT = `
|
||||
class TodoApp extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.handleChange = this.handleChange.bind(this);
|
||||
this.handleSubmit = this.handleSubmit.bind(this);
|
||||
this.state = {items: [], text: ''};
|
||||
var TodoList = React.createClass({
|
||||
render: function() {
|
||||
var createItem = function(itemText, index) {
|
||||
return <li key={index + itemText}>{itemText}</li>;
|
||||
};
|
||||
return <ul>{this.props.items.map(createItem)}</ul>;
|
||||
}
|
||||
|
||||
render() {
|
||||
});
|
||||
var TodoApp = React.createClass({
|
||||
getInitialState: function() {
|
||||
return {items: [], text: ''};
|
||||
},
|
||||
onChange: function(e) {
|
||||
this.setState({text: e.target.value});
|
||||
},
|
||||
handleSubmit: function(e) {
|
||||
e.preventDefault();
|
||||
var nextItems = this.state.items.concat([this.state.text]);
|
||||
var nextText = '';
|
||||
this.setState({items: nextItems, text: nextText});
|
||||
},
|
||||
render: function() {
|
||||
return (
|
||||
<div>
|
||||
<h3>TODO</h3>
|
||||
<TodoList items={this.state.items} />
|
||||
<form onSubmit={this.handleSubmit}>
|
||||
<input onChange={this.handleChange} value={this.state.text} />
|
||||
<input onChange={this.onChange} value={this.state.text} />
|
||||
<button>{'Add #' + (this.state.items.length + 1)}</button>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
handleChange(e) {
|
||||
this.setState({text: e.target.value});
|
||||
}
|
||||
React.render(<TodoApp />, mountNode);
|
||||
`;
|
||||
|
||||
handleSubmit(e) {
|
||||
e.preventDefault();
|
||||
var newItem = {
|
||||
text: this.state.text,
|
||||
id: Date.now()
|
||||
};
|
||||
this.setState((prevState) => ({
|
||||
items: prevState.items.concat(newItem),
|
||||
text: ''
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
class TodoList extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<ul>
|
||||
{this.props.items.map(item => (
|
||||
<li key={item.id}>{item.text}</li>
|
||||
))}
|
||||
</ul>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
ReactDOM.render(<TodoApp />, mountNode);
|
||||
`.trim();
|
||||
|
||||
ReactDOM.render(
|
||||
React.render(
|
||||
<ReactPlayground codeText={TODO_COMPONENT} />,
|
||||
document.getElementById('todoExample')
|
||||
);
|
||||
|
||||
82
docs/_js/html-jsx.js
Normal file
82
docs/_js/html-jsx.js
Normal file
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
* Copyright 2013-2015, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
/**
|
||||
* This is a web interface for the HTML to JSX converter contained in
|
||||
* `html-jsx-lib.js`.
|
||||
*/
|
||||
;(function() {
|
||||
|
||||
var HELLO_COMPONENT = "\
|
||||
<!-- Hello world -->\n\
|
||||
<div class=\"awesome\" style=\"border: 1px solid red\">\n\
|
||||
<label for=\"name\">Enter your name: </label>\n\
|
||||
<input type=\"text\" id=\"name\" />\n\
|
||||
</div>\n\
|
||||
<p>Enter your HTML here</p>\
|
||||
";
|
||||
|
||||
var HTMLtoJSXComponent = React.createClass({
|
||||
getInitialState: function() {
|
||||
return {
|
||||
outputClassName: 'NewComponent',
|
||||
createClass: true
|
||||
};
|
||||
},
|
||||
onReactClassNameChange: function(evt) {
|
||||
this.setState({ outputClassName: evt.target.value });
|
||||
},
|
||||
onCreateClassChange: function(evt) {
|
||||
this.setState({ createClass: evt.target.checked });
|
||||
},
|
||||
setInput: function(input) {
|
||||
this.setState({ input: input });
|
||||
this.convertToJsx();
|
||||
},
|
||||
convertToJSX: function(input) {
|
||||
var converter = new HTMLtoJSX({
|
||||
outputClassName: this.state.outputClassName,
|
||||
createClass: this.state.createClass
|
||||
});
|
||||
return converter.convert(input);
|
||||
},
|
||||
render: function() {
|
||||
return (
|
||||
<div>
|
||||
<div id="options">
|
||||
<label>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={this.state.createClass}
|
||||
onChange={this.onCreateClassChange} />
|
||||
Create class
|
||||
</label>
|
||||
<label style={{display: this.state.createClass ? '' : 'none'}}>
|
||||
·
|
||||
Class name:
|
||||
<input
|
||||
type="text"
|
||||
value={this.state.outputClassName}
|
||||
onChange={this.onReactClassNameChange} />
|
||||
</label>
|
||||
</div>
|
||||
<ReactPlayground
|
||||
codeText={HELLO_COMPONENT}
|
||||
renderCode={true}
|
||||
transformer={this.convertToJSX}
|
||||
showCompiledJSTab={false}
|
||||
editorTabTitle="Live HTML Editor"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
React.render(<HTMLtoJSXComponent />, document.getElementById('jsxCompiler'));
|
||||
}());
|
||||
46
docs/_js/jsx-compiler.js
Normal file
46
docs/_js/jsx-compiler.js
Normal file
@@ -0,0 +1,46 @@
|
||||
var HELLO_COMPONENT = "\
|
||||
var HelloMessage = React.createClass({\n\
|
||||
render: function() {\n\
|
||||
return <div>Hello {this.props.name}</div>;\n\
|
||||
}\n\
|
||||
});\n\
|
||||
\n\
|
||||
React.render(<HelloMessage name=\"John\" />, mountNode);\
|
||||
";
|
||||
|
||||
function transformer(harmony, code) {
|
||||
return JSXTransformer.transform(code, {harmony: harmony}).code;
|
||||
}
|
||||
|
||||
var CompilerPlayground = React.createClass({
|
||||
getInitialState: function() {
|
||||
return {harmony: false};
|
||||
},
|
||||
handleHarmonyChange: function(e) {
|
||||
this.setState({harmony: e.target.checked});
|
||||
},
|
||||
render: function() {
|
||||
return (
|
||||
<div>
|
||||
<ReactPlayground
|
||||
codeText={HELLO_COMPONENT}
|
||||
renderCode={true}
|
||||
transformer={transformer.bind(null, this.state.harmony)}
|
||||
showCompiledJSTab={false}
|
||||
showLineNumbers={true}
|
||||
/>
|
||||
<label className="compiler-option">
|
||||
<input
|
||||
type="checkbox"
|
||||
onChange={this.handleHarmonyChange}
|
||||
checked={this.state.harmony} />{' '}
|
||||
Enable ES6 transforms (<code>--harmony</code>)
|
||||
</label>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
React.render(
|
||||
<CompilerPlayground />,
|
||||
document.getElementById('jsxCompiler')
|
||||
);
|
||||
@@ -11,24 +11,24 @@ var IS_MOBILE = (
|
||||
var CodeMirrorEditor = React.createClass({
|
||||
propTypes: {
|
||||
lineNumbers: React.PropTypes.bool,
|
||||
onChange: React.PropTypes.func,
|
||||
onChange: React.PropTypes.func
|
||||
},
|
||||
getDefaultProps: function() {
|
||||
return {
|
||||
lineNumbers: false,
|
||||
lineNumbers: false
|
||||
};
|
||||
},
|
||||
componentDidMount: function() {
|
||||
if (IS_MOBILE) return;
|
||||
|
||||
this.editor = CodeMirror.fromTextArea(this.refs.editor, {
|
||||
mode: 'jsx',
|
||||
this.editor = CodeMirror.fromTextArea(React.findDOMNode(this.refs.editor), {
|
||||
mode: 'javascript',
|
||||
lineNumbers: this.props.lineNumbers,
|
||||
lineWrapping: true,
|
||||
smartIndent: false, // javascript mode does bad things with jsx indents
|
||||
matchBrackets: true,
|
||||
theme: 'solarized-light',
|
||||
readOnly: this.props.readOnly,
|
||||
readOnly: this.props.readOnly
|
||||
});
|
||||
this.editor.on('change', this.handleChange);
|
||||
},
|
||||
@@ -60,7 +60,7 @@ var CodeMirrorEditor = React.createClass({
|
||||
{editor}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
var selfCleaningTimeout = {
|
||||
@@ -71,7 +71,7 @@ var selfCleaningTimeout = {
|
||||
setTimeout: function() {
|
||||
clearTimeout(this.timeoutID);
|
||||
this.timeoutID = setTimeout.apply(null, arguments);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
var ReactPlayground = React.createClass({
|
||||
@@ -85,23 +85,17 @@ var ReactPlayground = React.createClass({
|
||||
renderCode: React.PropTypes.bool,
|
||||
showCompiledJSTab: React.PropTypes.bool,
|
||||
showLineNumbers: React.PropTypes.bool,
|
||||
editorTabTitle: React.PropTypes.string,
|
||||
editorTabTitle: React.PropTypes.string
|
||||
},
|
||||
|
||||
getDefaultProps: function() {
|
||||
return {
|
||||
transformer: function(code, options) {
|
||||
var presets = ['react'];
|
||||
if (!options || !options.skipES2015Transform) {
|
||||
presets.push('es2015');
|
||||
}
|
||||
return Babel.transform(code, {
|
||||
presets
|
||||
}).code;
|
||||
transformer: function(code) {
|
||||
return JSXTransformer.transform(code).code;
|
||||
},
|
||||
editorTabTitle: 'Live JSX Editor',
|
||||
showCompiledJSTab: true,
|
||||
showLineNumbers: false,
|
||||
showLineNumbers: false
|
||||
};
|
||||
},
|
||||
|
||||
@@ -121,15 +115,15 @@ var ReactPlayground = React.createClass({
|
||||
this.setState({mode: mode});
|
||||
},
|
||||
|
||||
compileCode: function(options) {
|
||||
return this.props.transformer(this.state.code, options);
|
||||
compileCode: function() {
|
||||
return this.props.transformer(this.state.code);
|
||||
},
|
||||
|
||||
render: function() {
|
||||
var isJS = this.state.mode === this.MODES.JS;
|
||||
var compiledCode = '';
|
||||
try {
|
||||
compiledCode = this.compileCode({skipES2015Transform: true});
|
||||
compiledCode = this.compileCode();
|
||||
} catch (err) {}
|
||||
|
||||
var JSContent =
|
||||
@@ -200,31 +194,29 @@ var ReactPlayground = React.createClass({
|
||||
},
|
||||
|
||||
executeCode: function() {
|
||||
var mountNode = this.refs.mount;
|
||||
var mountNode = React.findDOMNode(this.refs.mount);
|
||||
|
||||
try {
|
||||
ReactDOM.unmountComponentAtNode(mountNode);
|
||||
React.unmountComponentAtNode(mountNode);
|
||||
} catch (e) { }
|
||||
|
||||
try {
|
||||
var compiledCode;
|
||||
var compiledCode = this.compileCode();
|
||||
if (this.props.renderCode) {
|
||||
compiledCode = this.compileCode({skipES2015Transform: true});
|
||||
ReactDOM.render(
|
||||
React.render(
|
||||
<CodeMirrorEditor codeText={compiledCode} readOnly={true} />,
|
||||
mountNode
|
||||
);
|
||||
} else {
|
||||
compiledCode = this.compileCode({skipES2015Transform: false});
|
||||
eval(compiledCode);
|
||||
}
|
||||
} catch (err) {
|
||||
this.setTimeout(function() {
|
||||
ReactDOM.render(
|
||||
React.render(
|
||||
<div className="playgroundError">{err.toString()}</div>,
|
||||
mountNode
|
||||
);
|
||||
}, 500);
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
sectionid: community
|
||||
---
|
||||
|
||||
<section class="content wrap communityContent">
|
||||
<div class="inner-content">
|
||||
<a class="edit-page-link"
|
||||
href="https://github.com/facebook/react/tree/master/docs/{{ page.path }}"
|
||||
target="_blank">Edit on GitHub</a>
|
||||
<h1>
|
||||
{{ page.title }}
|
||||
</h1>
|
||||
<div class="subHeader">{{ page.description }}</div>
|
||||
|
||||
{{ content }}
|
||||
|
||||
<div class="docs-prevnext">
|
||||
{% if page.prev %}
|
||||
<a class="docs-prev" href="/react/community/{{ page.prev }}">← Prev</a>
|
||||
{% endif %}
|
||||
{% if page.next %}
|
||||
<a class="docs-next" href="/react/community/{{ page.next }}">Next →</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include nav_community.html %}
|
||||
</section>
|
||||
@@ -1,66 +1,94 @@
|
||||
{% if page.excerpt %}
|
||||
{% assign type = 'article' %}
|
||||
{% assign sectionTitle = 'React Blog' %}
|
||||
{% assign description = page.excerpt | strip_html %}
|
||||
{% else %}
|
||||
{% assign type = 'website' %}
|
||||
{% assign sectionTitle = 'React' %}
|
||||
{% assign description = 'A JavaScript library for building user interfaces' %}
|
||||
{% endif %}
|
||||
{% assign title = page.title | append: ' - ' | append: sectionTitle %}
|
||||
<!DOCTYPE html>
|
||||
<!--[if IE]><![endif]-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>{{ title }}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta property="og:title" content="{{ title }}">
|
||||
<meta property="og:type" content="{{ type }}">
|
||||
<meta property="og:url" content="https://facebook.github.io/react{{ page.url }}">
|
||||
<meta property="og:image" content="https://facebook.github.io/react/img/logo_og.png">
|
||||
<meta property="og:description" content="{{ description }}">
|
||||
<title>{{ page.title }} | React</title>
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<meta property="og:title" content="{{ page.title }} | React">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="http://facebook.github.io/react{{ page.url }}">
|
||||
<meta property="og:image" content="http://facebook.github.io/react/img/logo_og.png">
|
||||
<meta property="og:description" content="A JavaScript library for building user interfaces">
|
||||
<meta property="fb:app_id" content="623268441017527">
|
||||
|
||||
<link rel="shortcut icon" href="/react/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ site.name }}" href="{{ site.url }}{{ site.baseurl }}/feed.xml">
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css" />
|
||||
<link rel="stylesheet" href="/react/css/syntax.css">
|
||||
<link rel="stylesheet" href="/react/css/codemirror.css">
|
||||
<link rel="stylesheet" href="/react/css/react.css">
|
||||
|
||||
<script src="//use.typekit.net/vqa1hcx.js"></script>
|
||||
<script>try{Typekit.load();}catch(e){}</script>
|
||||
<script type="text/javascript" src="//use.typekit.net/vqa1hcx.js"></script>
|
||||
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
|
||||
|
||||
<!--[if lte IE 8]>
|
||||
<script src="/react/js/html5shiv.min.js"></script>
|
||||
<script src="/react/js/es5-shim.min.js"></script>
|
||||
<script src="/react/js/es5-sham.min.js"></script>
|
||||
<script type="text/javascript" src="/react/js/html5shiv.min.js"></script>
|
||||
<script type="text/javascript" src="/react/js/es5-shim.min.js"></script>
|
||||
<script type="text/javascript" src="/react/js/es5-sham.min.js"></script>
|
||||
<![endif]-->
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script>
|
||||
<script src="/react/js/codemirror.js"></script>
|
||||
<script src="/react/js/javascript.js"></script>
|
||||
<script src="/react/js/xml.js"></script>
|
||||
<script src="/react/js/jsx.js"></script>
|
||||
<script src="/react/js/react.js"></script>
|
||||
<script src="/react/js/react-dom.js"></script>
|
||||
<script src="/react/js/babel.min.js"></script>
|
||||
<script src="/react/js/live_editor.js"></script>
|
||||
<script type="text/javascript" src="/react/js/codemirror.js"></script>
|
||||
<script type="text/javascript" src="/react/js/javascript.js"></script>
|
||||
<script type="text/javascript" src="/react/js/react.js"></script>
|
||||
<script type="text/javascript" src="/react/js/JSXTransformer.js"></script>
|
||||
<script type="text/javascript" src="/react/js/live_editor.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
|
||||
{% include navigation.html %}
|
||||
<div class="nav-main">
|
||||
<div class="wrap">
|
||||
<a class="nav-home" href="/react/index.html">
|
||||
<img class="nav-logo" src="/react/img/logo.svg" width="36" height="36">
|
||||
React
|
||||
</a>
|
||||
<ul class="nav-site nav-site-internal">
|
||||
<li><a href="/react/docs/getting-started.html"{% if page.sectionid == 'docs' or page.sectionid == 'tips' %} class="active"{% endif %}>Docs</a></li>
|
||||
<li><a href="/react/support.html"{% if page.id == 'support' %} class="active"{% endif %}>Support</a></li>
|
||||
<li><a href="/react/downloads.html"{% if page.id == 'downloads' %} class="active"{% endif %}>Download</a></li>
|
||||
<li><a href="/react/blog/"{% if page.sectionid == 'blog' %} class="active"{% endif %}>Blog</a></li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav-site nav-site-external">
|
||||
<li><a href="https://github.com/facebook/react">GitHub</a>
|
||||
<li><a href="http://facebook.github.io/react-native/">React Native</a>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if page.id == 'home' %}
|
||||
<div class="hero">
|
||||
<div class="wrap">
|
||||
<div class="text"><strong>React</strong></div>
|
||||
<div class="minitext">
|
||||
A JavaScript library for building user interfaces
|
||||
</div>
|
||||
|
||||
<div class="buttons-unit">
|
||||
<a href="/react/docs/getting-started.html" class="button">Get Started</a>
|
||||
<a href="/react/downloads.html" class="button">Download React v{{site.react_version}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{{ content }}
|
||||
|
||||
{% include footer.html %}
|
||||
<footer class="wrap">
|
||||
<div class="left">
|
||||
A Facebook & Instagram collaboration.<br>
|
||||
<a href="/react/acknowledgements.html">Acknowledgements</a>
|
||||
</div>
|
||||
<div class="right">
|
||||
© 2013–{{ site.time | date: '%Y' }} Facebook Inc.<br>
|
||||
Documentation licensed under <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<div id="fb-root"></div>
|
||||
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
@@ -75,15 +103,9 @@
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) return;
|
||||
js = d.createElement(s); js.id = id;
|
||||
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.6&appId=623268441017527";
|
||||
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=623268441017527";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));
|
||||
|
||||
docsearch({
|
||||
apiKey: '36221914cce388c46d0420343e0bb32e',
|
||||
indexName: 'react',
|
||||
inputSelector: '#algolia-doc-search'
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,10 +4,12 @@ sectionid: docs
|
||||
---
|
||||
|
||||
<section class="content wrap documentationContent">
|
||||
{% include nav_docs.html %}
|
||||
|
||||
<div class="inner-content">
|
||||
<a class="edit-page-link" href="https://github.com/facebook/react/tree/master/docs/{{ page.path }}" target="_blank">Edit on GitHub</a>
|
||||
<h1>
|
||||
{{ page.title }}
|
||||
<a class="edit-page-link" href="https://github.com/facebook/react/tree/master/docs/{{ page.path }}" target="_blank">Edit on GitHub</a>
|
||||
</h1>
|
||||
<div class="subHeader">{{ page.description }}</div>
|
||||
|
||||
@@ -22,6 +24,4 @@ sectionid: docs
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include nav_docs.html %}
|
||||
</section>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
{% if page.id == 'home' %}
|
||||
{% include hero.html %}
|
||||
{% endif %}
|
||||
|
||||
<section class="content wrap">
|
||||
{{ content }}
|
||||
</section>
|
||||
@@ -4,9 +4,17 @@ sectionid: blog
|
||||
---
|
||||
|
||||
<section class="content wrap blogContent">
|
||||
|
||||
<div class="inner-content">
|
||||
{% include blog_post.html isPermalink="true" page=page content=content %}
|
||||
</div>
|
||||
{% include nav_blog.html %}
|
||||
<div class="inner-content">
|
||||
<h1>{{ page.title }}</h1>
|
||||
<p class="meta">{{ page.date | date: "%B %e, %Y" }} by {{ page.author }}</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="post">
|
||||
{{ content }}
|
||||
</div>
|
||||
|
||||
<div class="fb-like" data-send="true" data-width="650" data-show-faces="false"></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>Redirecting...</title>
|
||||
<link rel=canonical href="{{ page.dest_url }}">
|
||||
<meta http-equiv=refresh content="0; url={{ page.dest_url }}">
|
||||
<h1>Redirecting...</h1>
|
||||
<a href="{{ page.dest_url }}">Click here if you are not redirected.</a>
|
||||
<script>location="{{ page.dest_url }}"</script>
|
||||
@@ -1,9 +1,11 @@
|
||||
---
|
||||
layout: default
|
||||
sectionid: contributing
|
||||
sectionid: tips
|
||||
---
|
||||
|
||||
<section class="content wrap documentationContent">
|
||||
{% include nav_docs.html %}
|
||||
|
||||
<div class="inner-content">
|
||||
<h1>{{ page.title }}</h1>
|
||||
<div class="subHeader">{{ page.description }}</div>
|
||||
@@ -11,13 +13,11 @@ sectionid: contributing
|
||||
|
||||
<div class="docs-prevnext">
|
||||
{% if page.prev %}
|
||||
<a class="docs-prev" href="/react/contributing/{{ page.prev }}">← Prev</a>
|
||||
<a class="docs-prev" href="/react/tips/{{ page.prev }}">← Prev</a>
|
||||
{% endif %}
|
||||
{% if page.next %}
|
||||
<a class="docs-next" href="/react/contributing/{{ page.next }}">Next →</a>
|
||||
<a class="docs-next" href="/react/tips/{{ page.next }}">Next →</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include nav_docs.html %}
|
||||
</section>
|
||||
@@ -1,29 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
sectionid: tutorial
|
||||
---
|
||||
|
||||
<section class="content wrap documentationContent">
|
||||
{% include nav_tutorial.html %}
|
||||
|
||||
<div class="inner-content">
|
||||
<a class="edit-page-link"
|
||||
href="https://github.com/facebook/react/tree/master/docs/{{ page.path }}"
|
||||
target="_blank">Edit on GitHub</a>
|
||||
<h1>
|
||||
{{ page.title }}
|
||||
</h1>
|
||||
<div class="subHeader">{{ page.description }}</div>
|
||||
|
||||
{{ content }}
|
||||
|
||||
<div class="docs-prevnext">
|
||||
{% if page.prev %}
|
||||
<a class="docs-prev" href="/react/tutorial/{{ page.prev }}">← Prev</a>
|
||||
{% endif %}
|
||||
{% if page.next %}
|
||||
<a class="docs-next" href="/react/tutorial/{{ page.next }}">Next →</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -1,22 +0,0 @@
|
||||
# This transforms the data associated with each post, specifically the author.
|
||||
# We store our author information in a yaml file and specify the keys in The
|
||||
# post front matter. Instead of looking up the complete data each time we need
|
||||
# it, we'll just look it up here and assign. This plays nicely with tools like
|
||||
# jekyll-feed which expect post.author to be in a specific format.
|
||||
module Authors
|
||||
class Generator < Jekyll::Generator
|
||||
def generate(site)
|
||||
site.posts.docs.each do |post|
|
||||
authors = []
|
||||
if post['author'].kind_of?(Array)
|
||||
for author in post['author']
|
||||
authors.push(site.data['authors'][author])
|
||||
end
|
||||
else
|
||||
authors.push(site.data['authors'][post['author']])
|
||||
end
|
||||
post.data['authors'] = authors
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -2,17 +2,14 @@ require 'redcarpet'
|
||||
require 'sanitize'
|
||||
|
||||
# Simple converter that is probably better than RedCarpet's built in TOC id
|
||||
# generator (which ends up with things like id="toc_1"... terrible).
|
||||
# generator (which ends up with things lik id="toc_1"... terrible).
|
||||
|
||||
class Redcarpet::Render::HTML
|
||||
def header(title, level)
|
||||
# \p{Common} does not seem to include some of the Japanese alphabets and also includes
|
||||
# some undesired characters like colon and parentheses, so we have to write out the
|
||||
# necessary Unicode scripts individually.
|
||||
clean_title = Sanitize.clean(title)
|
||||
.downcase
|
||||
.gsub(/\s+/, "-")
|
||||
.gsub(/[^A-Za-z0-9\-_.\p{Cyrillic}\p{Hangul}\p{Hiragana}\p{Katakana}\p{Han}]/, "")
|
||||
.gsub(/[^A-Za-z0-9\-_.]/, "")
|
||||
|
||||
return "<h#{level}><a class=\"anchor\" name=\"#{clean_title}\"></a>#{title} <a class=\"hash-link\" href=\"##{clean_title}\">#</a></h#{level}>"
|
||||
end
|
||||
|
||||
@@ -1,39 +1,13 @@
|
||||
module Jekyll
|
||||
module SidebarItemFilter
|
||||
def docs_sidebar_link(item)
|
||||
return sidebar_helper(item, 'docs')
|
||||
end
|
||||
|
||||
def docs_old_sidebar_link(item)
|
||||
return sidebar_helper(item, 'docs-old')
|
||||
end
|
||||
|
||||
def community_sidebar_link(item)
|
||||
return sidebar_helper(item, 'community')
|
||||
end
|
||||
|
||||
def tutorial_sidebar_link(item)
|
||||
return sidebar_helper(item, 'tutorial')
|
||||
end
|
||||
|
||||
def sidebar_helper(item, group)
|
||||
forceInternal = item["forceInternal"]
|
||||
|
||||
def sidebar_item_link(item)
|
||||
pageID = @context.registers[:page]["id"]
|
||||
itemID = item["id"]
|
||||
href = item["href"] || "/react/#{group}/#{itemID}.html"
|
||||
classes = []
|
||||
if pageID == itemID
|
||||
classes.push("active")
|
||||
end
|
||||
if item["href"] && (forceInternal == nil)
|
||||
classes.push("external")
|
||||
end
|
||||
className = classes.size > 0 ? " class=\"#{classes.join(' ')}\"" : ""
|
||||
href = item["href"] || "/react/docs/#{itemID}.html"
|
||||
className = pageID == itemID ? ' class="active"' : ''
|
||||
|
||||
return "<a href=\"#{href}\"#{className}>#{item["title"]}</a>"
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
title: JSFiddle Integration
|
||||
author: vjeux
|
||||
author: Christopher Chedeau
|
||||
---
|
||||
|
||||
[JSFiddle](https://jsfiddle.net) just announced support for React. This is an exciting news as it makes collaboration on snippets of code a lot easier. You can play around this **[base React JSFiddle](http://jsfiddle.net/vjeux/kb3gN/)**, fork it and share it! A [fiddle without JSX](http://jsfiddle.net/vjeux/VkebS/) is also available.
|
||||
[JSFiddle](http://jsfiddle.net) just announced support for React. This is an exciting news as it makes collaboration on snippets of code a lot easier. You can play around this **[base React JSFiddle](http://jsfiddle.net/vjeux/kb3gN/)**, fork it and share it! A [fiddle without JSX](http://jsfiddle.net/vjeux/VkebS/) is also available.
|
||||
|
||||
|
||||
<blockquote class="twitter-tweet" align="center"><p>React (by Facebook) is now available on JSFiddle. <a href="http://t.co/wNQf9JPv5u" title="http://facebook.github.io/react/">facebook.github.io/react/</a></p>— JSFiddle (@jsfiddle) <a href="https://twitter.com/jsfiddle/status/341114115781177344">June 2, 2013</a></blockquote>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Why did we build React?
|
||||
author: petehunt
|
||||
author: Pete Hunt
|
||||
---
|
||||
|
||||
There are a lot of JavaScript MVC frameworks out there. Why did we build React
|
||||
@@ -40,7 +40,7 @@ React really shines when your data changes over time.
|
||||
In a traditional JavaScript application, you need to look at what data changed
|
||||
and imperatively make changes to the DOM to keep it up-to-date. Even AngularJS,
|
||||
which provides a declarative interface via directives and data binding [requires
|
||||
a linking function to manually update DOM nodes](https://code.angularjs.org/1.0.8/docs/guide/directive#reasonsbehindthecompilelinkseparation).
|
||||
a linking function to manually update DOM nodes](http://code.angularjs.org/1.0.8/docs/guide/directive#reasonsbehindthecompilelinkseparation).
|
||||
|
||||
React takes a different approach.
|
||||
|
||||
@@ -56,7 +56,7 @@ to the DOM.
|
||||
> lightweight description of what the DOM should look like.
|
||||
|
||||
We call this process **reconciliation**. Check out
|
||||
[this jsFiddle](http://jsfiddle.net/2h6th4ju/) to see an example of
|
||||
[this jsFiddle](http://jsfiddle.net/fv6RD/3/) to see an example of
|
||||
reconciliation in action.
|
||||
|
||||
Because this re-render is so fast (around 1ms for TodoMVC), the developer
|
||||
@@ -74,7 +74,7 @@ some pretty cool things with it:
|
||||
- We've built internal prototypes that run React apps in a web worker and use
|
||||
React to drive **native iOS views** via an Objective-C bridge.
|
||||
- You can run React
|
||||
[on the server](https://github.com/petehunt/react-server-rendering-example)
|
||||
[on the server](http://github.com/petehunt/react-server-rendering-example)
|
||||
for SEO, performance, code sharing and overall flexibility.
|
||||
- Events behave in a consistent, standards-compliant way in all browsers
|
||||
(including IE8) and automatically use
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Community Round-up #1"
|
||||
author: vjeux
|
||||
author: Vjeux
|
||||
---
|
||||
|
||||
React was open sourced two weeks ago and it's time for a little round-up of what has been going on.
|
||||
@@ -38,10 +38,10 @@ It looks like [Ben Alpert](http://benalpert.com/) is the first person outside of
|
||||
|
||||
## Origins of React
|
||||
|
||||
[Pete Hunt](http://www.petehunt.net/blog/) explained what differentiates React from other JavaScript libraries in [a previous blog post](/react/blog/2013/06/05/why-react.html). [Lee Byron](http://leebyron.com/) gives another perspective on Quora:
|
||||
[Pete Hunt](http://www.petehunt.net/blog/) explained what differentiates React from other JavaScript libraries in [a previous blog post](http://facebook.github.io/react/blog/2013/06/05/why-react.html). [Lee Byron](http://leebyron.com/) gives another perspective on Quora:
|
||||
|
||||
> React isn't quite like any other popular Javascript libraries, and it solves a very specific problem: complex UI rendering. It's also intended to be used along side many other popular libraries. For example, React works well with Backbone.js, amongst many others.
|
||||
>
|
||||
> React was born out of frustrations with the common pattern of writing two-way data bindings in complex MVC apps. React is an implementation of one-way data bindings.
|
||||
>
|
||||
> [Read the full post...](https://www.quora.com/React-JS-Library/How-is-Facebooks-React-JavaScript-library/answer/Lee-Byron?srid=3DcX)
|
||||
> [Read the full post...](http://www.quora.com/React-JS-Library/How-is-Facebooks-React-JavaScript-library/answer/Lee-Byron?srid=3DcX)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Community Round-up #2"
|
||||
author: vjeux
|
||||
author: Vjeux
|
||||
---
|
||||
|
||||
Since the launch we have received a lot of feedback and are actively working on React 0.4. In the meantime, here are the highlights of this week.
|
||||
@@ -21,12 +21,12 @@ Since the launch we have received a lot of feedback and are actively working on
|
||||
|
||||
## React and Socket.IO Chat Application
|
||||
|
||||
[Danial Khosravi](https://danialk.github.io/) made a real-time chat application that interacts with the back-end using Socket.IO.
|
||||
[Danial Khosravi](http://danialk.github.io/) made a real-time chat application that interacts with the back-end using Socket.IO.
|
||||
|
||||
> A week ago I was playing with AngularJS and [this little chat application](https://github.com/btford/angular-socket-io-im) which uses socket.io and nodejs for realtime communication. Yesterday I saw a post about ReactJS in [EchoJS](http://www.echojs.com/) and started playing with this UI library. After playing a bit with React, I decided to write and chat application using React and I used Bran Ford's Backend for server side of this little app.
|
||||
> <figure>[](https://danialk.github.io/blog/2013/06/16/reactjs-and-socket-dot-io-chat-application/)</figure>
|
||||
> <figure>[](http://danialk.github.io/blog/2013/06/16/reactjs-and-socket-dot-io-chat-application/)</figure>
|
||||
>
|
||||
> [Read the full post...](https://danialk.github.io/blog/2013/06/16/reactjs-and-socket-dot-io-chat-application/)
|
||||
> [Read the full post...](http://danialk.github.io/blog/2013/06/16/reactjs-and-socket-dot-io-chat-application/)
|
||||
|
||||
## React and Other Frameworks
|
||||
|
||||
@@ -36,7 +36,7 @@ Since the launch we have received a lot of feedback and are actively working on
|
||||
>
|
||||
> We've designed React from the beginning to work well with other libraries. Angular is no exception. Let's take the original Angular example and use React to implement the fundoo-rating directive.
|
||||
>
|
||||
> [Read the full post...](https://www.quora.com/Pete-Hunt/Posts/Facebooks-React-vs-AngularJS-A-Closer-Look)
|
||||
> [Read the full post...](http://www.quora.com/Pete-Hunt/Posts/Facebooks-React-vs-AngularJS-A-Closer-Look)
|
||||
|
||||
In the same vein, [Markov Twain](https://twitter.com/markov_twain/status/345702941845499906) re-implemented the examples on the front-page [with Ember](http://jsbin.com/azihiw/2/edit) and [Vlad Yazhbin](https://twitter.com/vla) re-implemented the tutorial [with Angular](http://jsfiddle.net/vla/Cdrse/).
|
||||
|
||||
@@ -64,7 +64,7 @@ Mozilla and Google are actively working on Web Components. [Vjeux](http://blog.v
|
||||
|
||||
Many of you pointed out differences between JSX and HTML. In order to clear up some confusion, we have added some documentation that covers the four main differences:
|
||||
|
||||
- [Whitespace removal](/react/docs/jsx-is-not-html.html)
|
||||
- [HTML Entities](/react/docs/jsx-is-not-html.html)
|
||||
- [Comments](/react/docs/jsx-is-not-html.html)
|
||||
- [Custom HTML Attributes](/react/docs/jsx-is-not-html.html)
|
||||
- [Whitespace removal](http://facebook.github.io/react/docs/jsx-is-not-html.html)
|
||||
- [HTML Entities](http://facebook.github.io/react/docs/jsx-is-not-html.html)
|
||||
- [Comments](http://facebook.github.io/react/docs/jsx-is-not-html.html)
|
||||
- [Custom HTML Attributes](http://facebook.github.io/react/docs/jsx-is-not-html.html)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "React v0.3.3"
|
||||
author: zpao
|
||||
author: Paul O'Shannessy
|
||||
---
|
||||
|
||||
We have a ton of great stuff coming in v0.4, but in the meantime we're releasing v0.3.3. This release addresses some small issues people were having and simplifies our tools to make them easier to use.
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
---
|
||||
title: "Community Round-up #3"
|
||||
author: vjeux
|
||||
author: Vjeux
|
||||
---
|
||||
|
||||
The highlight of this week is that an interaction-heavy app has been ported to React. React components are solving issues they had with nested views.
|
||||
|
||||
## Moving From Backbone To React
|
||||
|
||||
[Clay Allsopp](https://twitter.com/clayallsopp) successfully ported [Propeller](http://usepropeller.com/blog/posts/from-backbone-to-react/), a fairly big, interaction-heavy JavaScript app, to React.
|
||||
[Clay Allsopp](http://twitter.com/clayallsopp) successfully ported [Propeller](http://usepropeller.com/blog/posts/from-backbone-to-react/), a fairly big, interaction-heavy JavaScript app, to React.
|
||||
|
||||
> [<img style="float: right; margin: 0 0 10px 10px;" src="/react/img/blog/propeller-logo.png" />](http://usepropeller.com/blog/posts/from-backbone-to-react/)Subviews involve a lot of easy-to-forget boilerplate that Backbone (by design) doesn't automate. Libraries like Backbone.Marionette offer more abstractions to make view nesting easier, but they're all limited by the fact that Backbone delegates how and went view-document attachment occurs to the application code.
|
||||
>
|
||||
@@ -19,7 +19,7 @@ The highlight of this week is that an interaction-heavy app has been ported to R
|
||||
|
||||
## Grunt Task for JSX
|
||||
|
||||
[Eric Clemmons](https://ericclemmons.github.io/) wrote a task for [Grunt](http://gruntjs.com/) that applies the JSX transformation to your Javascript files. It also works with [Browserify](http://browserify.org/) if you want all your files to be concatenated and minified together.
|
||||
[Eric Clemmons](http://ericclemmons.github.io/) wrote a task for [Grunt](http://gruntjs.com/) that applies the JSX transformation to your Javascript files. It also works with [Browserify](http://browserify.org/) if you want all your files to be concatenated and minified together.
|
||||
|
||||
> Grunt task for compiling Facebook React's .jsx templates into .js
|
||||
>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "New in React v0.4: Autobind by Default"
|
||||
author: zpao
|
||||
author: Paul O'Shannessy
|
||||
---
|
||||
|
||||
React v0.4 is very close to completion. As we finish it off, we'd like to share with you some of the major changes we've made since v0.3. This is the first of several posts we'll be making over the next week.
|
||||
@@ -8,7 +8,7 @@ React v0.4 is very close to completion. As we finish it off, we'd like to share
|
||||
|
||||
## What is React.autoBind?
|
||||
|
||||
If you take a look at most of our current examples, you'll see us using `React.autoBind` for event handlers. This is used in place of `Function.prototype.bind`. Remember that in JS, [function calls are late-bound](https://bonsaiden.github.io/JavaScript-Garden/#function.this). That means that if you simply pass a function around, the `this` used inside won't necessarily be the `this` you expect. `Function.prototype.bind` creates a new, properly bound, function so that when called, `this` is exactly what you expect it to be.
|
||||
If you take a look at most of our current examples, you'll see us using `React.autoBind` for event handlers. This is used in place of `Function.prototype.bind`. Remember that in JS, [function calls are late-bound](http://bonsaiden.github.io/JavaScript-Garden/#function.this). That means that if you simply pass a function around, the `this` used inside won't necessarily be the `this` you expect. `Function.prototype.bind` creates a new, properly bound, function so that when called, `this` is exactly what you expect it to be.
|
||||
|
||||
Before we launched React, we would write this:
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Community Round-up #4"
|
||||
author: vjeux
|
||||
author: Vjeux
|
||||
---
|
||||
|
||||
React reconciliation process appears to be very well suited to implement a text editor with a live preview as people at Khan Academy show us.
|
||||
@@ -47,11 +47,11 @@ Over the past several weeks, members of our team, [Pete Hunt](http://www.petehun
|
||||
|
||||
[Pete Hunt](http://www.petehunt.net/) recorded himself implementing a simple `<Blink>` tag in React.
|
||||
|
||||
<figure><iframe src="https://player.vimeo.com/video/67248575" width="100%" height="340" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></figure>
|
||||
<figure><iframe src="https://player.vimeo.com/video/67248575" width="500" height="340" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></figure>
|
||||
|
||||
## Snake in React
|
||||
|
||||
[Tom Occhino](http://tomocchino.com/) implemented Snake in 150 lines with React.
|
||||
|
||||
> [Check the source on Github](https://github.com/tomocchino/react-snake/blob/master/src/snake.js)
|
||||
> <figure>[](https://tomocchino.github.io/react-snake/)</figure>
|
||||
> <figure>[](http://tomocchino.github.io/react-snake/)</figure>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "New in React v0.4: Prop Validation and Default Values"
|
||||
author: zpao
|
||||
author: Paul O'Shannessy
|
||||
---
|
||||
|
||||
Many of the questions we got following the public launch of React revolved around `props`, specifically that people wanted to do validation and to make sure their components had sensible defaults.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
---
|
||||
title: "React v0.4.0"
|
||||
author: zpao
|
||||
author: Paul O'Shannessy
|
||||
---
|
||||
|
||||
Over the past 2 months we've been taking feedback and working hard to make React even better. We fixed some bugs, made some under-the-hood improvements, and added several features that we think will improve the experience developing with React. Today we're proud to announce the availability of React v0.4!
|
||||
|
||||
|
||||
This release could not have happened without the support of our growing community. Since launch day, the community has contributed blog posts, questions to the [Google Group](https://groups.google.com/group/reactjs), and issues and pull requests on GitHub. We've had contributions ranging from documentation improvements to major changes to React's rendering. We've seen people integrate React into the tools they're using and the products they're building, and we're all very excited to see what our budding community builds next!
|
||||
This release could not have happened without the support of our growing community. Since launch day, the community has contributed blog posts, questions to the [Google Group](http://groups.google.com/group/reactjs), and issues and pull requests on GitHub. We've had contributions ranging from documentation improvements to major changes to React's rendering. We've seen people integrate React into the tools they're using and the products they're building, and we're all very excited to see what our budding community builds next!
|
||||
|
||||
React v0.4 has some big changes. We've also restructured the documentation to better communicate how to use React. We've summarized the changes below and linked to documentation where we think it will be especially useful.
|
||||
|
||||
@@ -18,10 +18,10 @@ When you're ready, [go download it](/react/downloads.html)!
|
||||
* Switch from using `id` attribute to `data-reactid` to track DOM nodes. This allows you to integrate with other JS and CSS libraries more easily.
|
||||
* Support for more DOM elements and attributes (e.g., `<canvas>`)
|
||||
* Improved server-side rendering APIs. `React.renderComponentToString(<component>, callback)` allows you to use React on the server and generate markup which can be sent down to the browser.
|
||||
* `prop` improvements: validation and default values. [Read our blog post for details...](/react/blog/2013/07/11/react-v0-4-prop-validation-and-default-values.html)
|
||||
* Support for the `key` prop, which allows for finer control over reconciliation. [Read the docs for details...](/react/docs/multiple-components.html)
|
||||
* Removed `React.autoBind`. [Read our blog post for details...](/react/blog/2013/07/02/react-v0-4-autobind-by-default.html)
|
||||
* Improvements to forms. We've written wrappers around `<input>`, `<textarea>`, `<option>`, and `<select>` in order to standardize many inconsistencies in browser implementations. This includes support for `defaultValue`, and improved implementation of the `onChange` event, and circuit completion. [Read the docs for details...](/react/docs/forms.html)
|
||||
* `prop` improvements: validation and default values. [Read our blog post for details...](http://facebook.github.io/react/blog/2013/07/11/react-v0-4-prop-validation-and-default-values.html)
|
||||
* Support for the `key` prop, which allows for finer control over reconciliation. [Read the docs for details...](http://facebook.github.io/react/docs/multiple-components.html)
|
||||
* Removed `React.autoBind`. [Read our blog post for details...](http://facebook.github.io/react/blog/2013/07/02/react-v0-4-autobind-by-default.html)
|
||||
* Improvements to forms. We've written wrappers around `<input>`, `<textarea>`, `<option>`, and `<select>` in order to standardize many inconsistencies in browser implementations. This includes support for `defaultValue`, and improved implementation of the `onChange` event, and circuit completion. [Read the docs for details...](http://facebook.github.io/react/docs/forms.html)
|
||||
* We've implemented an improved synthetic event system that conforms to the W3C spec.
|
||||
* Updates to your component are batched now, which may result in a significantly faster re-render of components. `this.setState` now takes an optional callback as its second parameter. If you were using `onClick={this.setState.bind(this, state)}` previously, you'll want to make sure you add a third parameter so that the event is not treated as the callback.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Community Round-up #5"
|
||||
author: vjeux
|
||||
author: Vjeux
|
||||
---
|
||||
|
||||
We launched the [React Facebook Page](https://www.facebook.com/react) along with the React v0.4 launch. 700 people already liked it to get updated on the project :)
|
||||
@@ -52,7 +52,7 @@ Learning a new library is always easier when you have working examples you can p
|
||||
|
||||
## React Chosen Wrapper
|
||||
|
||||
[Cheng Lou](https://github.com/chenglou) wrote a wrapper for the [Chosen](https://harvesthq.github.io/chosen/) input library called [react-chosen](https://github.com/chenglou/react-chosen). It took just 25 lines to be able to use jQuery component as a React one.
|
||||
[Cheng Lou](https://github.com/chenglou) wrote a wrapper for the [Chosen](http://harvesthq.github.io/chosen/) input library called [react-chosen](https://github.com/chenglou/react-chosen). It took just 25 lines to be able to use jQuery component as a React one.
|
||||
|
||||
```javascript
|
||||
React.renderComponent(
|
||||
@@ -68,14 +68,14 @@ React.renderComponent(
|
||||
|
||||
[Domenic Denicola](http://domenicdenicola.com/) wrote a slide deck about the great applications of ES6 features and one slide shows how we could use Template Strings to compile JSX at run-time without the need for a pre-processing phase.
|
||||
|
||||
<figure><iframe src="https://www.slideshare.net/slideshow/embed_code/24187146?rel=0&startSlide=36" width="100%" height="356" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe></figure>
|
||||
<figure><iframe src="https://www.slideshare.net/slideshow/embed_code/24187146?rel=0&startSlide=36" width="600" height="356" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe></figure>
|
||||
|
||||
|
||||
## React Presentation
|
||||
|
||||
[Tom Occhino](http://tomocchino.com/) and [Jordan Walke](https://github.com/jordwalke), React developers, did a presentation of React at Facebook Seattle's office. Check out the first 25 minutes for the presentation and the remaining 45 for a Q&A. I highly recommend you watching this video.
|
||||
|
||||
<figure><iframe width="100%" height="400" src="//www.youtube-nocookie.com/embed/XxVg_s8xAms" frameborder="0" allowfullscreen></iframe></figure>
|
||||
<figure><iframe width="650" height="400" src="//www.youtube.com/embed/XxVg_s8xAms" frameborder="0" allowfullscreen></iframe></figure>
|
||||
|
||||
|
||||
## Docs
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "React v0.4.1"
|
||||
author: zpao
|
||||
author: Paul O'Shannessy
|
||||
---
|
||||
|
||||
React v0.4.1 is a small update, mostly containing correctness fixes. Some code has been restructured internally but those changes do not impact any of our public APIs.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Use React and JSX in Ruby on Rails"
|
||||
author: zpao
|
||||
author: Paul O'Shannessy
|
||||
---
|
||||
|
||||
Today we're releasing a gem to make it easier to use React and JSX in Ruby on Rails applications: [react-rails](https://github.com/facebook/react-rails).
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Community Round-up #6"
|
||||
author: vjeux
|
||||
author: Vjeux
|
||||
---
|
||||
|
||||
This is the first Community Round-up where none of the items are from Facebook/Instagram employees. It's great to see the adoption of React growing.
|
||||
@@ -54,7 +54,7 @@ este.demos.react.todoApp = este.react.create (`/** @lends {React.ReactComponent.
|
||||
|
||||
## React Stylus Boilerplate
|
||||
|
||||
[Zaim Bakar](https://zaim.github.io/) shared his boilerplate to get started with Stylus CSS processor.
|
||||
[Zaim Bakar](http://zaim.github.io/) shared his boilerplate to get started with Stylus CSS processor.
|
||||
|
||||
> This is my boilerplate React project using Grunt as the build tool, and Stylus as my CSS preprocessor.
|
||||
>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Use React and JSX in Python Applications"
|
||||
author: kmeht
|
||||
author: Kunal Mehta
|
||||
---
|
||||
|
||||
Today we're happy to announce the initial release of [PyReact](https://github.com/facebook/react-python), which makes it easier to use React and JSX in your Python applications. It's designed to provide an API to transform your JSX files into JavaScript, as well as provide access to the latest React source files.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Community Round-up #7"
|
||||
author: vjeux
|
||||
author: Vjeux
|
||||
---
|
||||
|
||||
It's been three months since we open sourced React and it is going well. Some stats so far:
|
||||
@@ -10,7 +10,7 @@ It's been three months since we open sourced React and it is going well. Some st
|
||||
* [226 posts on Google Group](https://groups.google.com/forum/#!forum/reactjs)
|
||||
* [76 Github projects using React](https://gist.github.com/vjeux/6335762)
|
||||
* [30 contributors](https://github.com/facebook/react/graphs/contributors)
|
||||
* [15 blog posts](/react/blog/)
|
||||
* [15 blog posts](http://facebook.github.io/react/blog/)
|
||||
* 2 early adopters: [Khan Academy](http://benalpert.com/2013/06/09/using-react-to-speed-up-khan-academy.html) and [Propeller](http://usepropeller.com/blog/posts/from-backbone-to-react/)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Community Round-up #8"
|
||||
author: vjeux
|
||||
author: Vjeux
|
||||
---
|
||||
|
||||
A lot has happened in the month since our last update. Here are some of the more interesting things we've found. But first, we have a couple updates before we share links.
|
||||
@@ -34,7 +34,7 @@ While this is not going to work for all the attributes since they are camelCased
|
||||
|
||||
## Remarkable React
|
||||
|
||||
[Stoyan Stefanov](http://www.phpied.com/) gave a talk at [BrazilJS](http://braziljs.com.br/) about React and wrote an article with the content of the presentation. He goes through the difficulties of writing _active apps_ using the DOM API and shows how React handles it.
|
||||
[Stoyan Stefanov](http://www.phpied.com/) gave a talk at [BrazilJS](http://braziljs.com.br/) about React and wrote an article with the content of the presentation. He goes through the difficulties of writting _active apps_ using the DOM API and shows how React handles it.
|
||||
|
||||
> So how does exactly React deal with it internally? Two crazy ideas - virtual DOM and synthetic events.
|
||||
>
|
||||
@@ -66,4 +66,4 @@ While this is not going to work for all the attributes since they are camelCased
|
||||
|
||||
[Vjeux](http://blog.vjeux.com/) re-implemented the display part of the IRC logger in React. Just 130 lines are needed for a performant infinite scroll with timestamps and color-coded author names.
|
||||
|
||||
[View the source on JSFiddle...](http://jsfiddle.net/vjeux/QL9tz)
|
||||
<iframe width="100%" height="300" src="https://jsfiddle.net/vjeux/QL9tz/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "React v0.5"
|
||||
author: zpao
|
||||
author: Paul O'Shannessy
|
||||
---
|
||||
|
||||
This release is the result of several months of hard work from members of the team and the community. While there are no groundbreaking changes in core, we've worked hard to improve performance and memory usage. We've also worked hard to make sure we are being consistent in our usage of DOM properties.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "React v0.5.1"
|
||||
author: zpao
|
||||
author: Paul O'Shannessy
|
||||
---
|
||||
|
||||
This release focuses on fixing some small bugs that have been uncovered over the past two weeks. I would like to thank everybody involved, specifically members of the community who fixed half of the issues found. Thanks to [Ben Alpert][1], [Andrey Popp][2], and [Laurence Rowe][3] for their contributions!
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Community Round-up #9"
|
||||
author: vjeux
|
||||
author: Vjeux
|
||||
---
|
||||
|
||||
We organized a React hackathon last week-end in the Facebook Seattle office. 50 people, grouped into 15 teams, came to hack for a day on React. It was a lot of fun and we'll probably organize more in the future.
|
||||
@@ -29,7 +29,7 @@ We organized a React hackathon last week-end in the Facebook Seattle office. 50
|
||||
|
||||
The video will be available soon on the [JSConf EU website](http://2013.jsconf.eu/speakers/pete-hunt-react-rethinking-best-practices.html), but in the meantime, here are Pete's slides:
|
||||
|
||||
<figure><iframe src="https://www.slideshare.net/slideshow/embed_code/26589373" width="100%" height="450" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen></iframe></figure>
|
||||
<figure><iframe src="https://www.slideshare.net/slideshow/embed_code/26589373" width="550" height="450" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen></iframe></figure>
|
||||
|
||||
|
||||
## Pump - Clojure bindings for React
|
||||
@@ -56,7 +56,7 @@ The video will be available soon on the [JSConf EU website](http://2013.jsconf.e
|
||||
|
||||
[Todd Kennedy](http://blog.selfassembled.org/) working at [Condé Nast](http://www.condenast.com/) implemented a wrapper on-top of [JSHint](http://www.jshint.com/) that first converts JSX files to JS.
|
||||
|
||||
> A wrapper around JSHint to allow linting of files containing JSX syntax. Accepts glob patterns. Respects your local .jshintrc file and .gitignore to filter your glob patterns.
|
||||
> A wrapper around JSHint to allow linting of files containg JSX syntax. Accepts glob patterns. Respects your local .jshintrc file and .gitignore to filter your glob patterns.
|
||||
>
|
||||
> ```
|
||||
npm install -g jsxhint
|
||||
@@ -96,3 +96,4 @@ var Table = React.createClass({
|
||||
> You see that React components are defined using a regular JS object. Some properties and methods of the object such as render() have special meanings, the rest is upforgrabs.
|
||||
>
|
||||
> [Read the full article...](http://www.phpied.com/reactive-table/)
|
||||
|
||||
|
||||
142
docs/_posts/2013-11-05-thinking-in-react.md
Normal file
142
docs/_posts/2013-11-05-thinking-in-react.md
Normal file
@@ -0,0 +1,142 @@
|
||||
---
|
||||
title: "Thinking in React"
|
||||
author: Pete Hunt
|
||||
---
|
||||
|
||||
React is, in my opinion, the premier way to build big, fast Web apps with JavaScript. It has scaled very well for us at Facebook and Instagram.
|
||||
|
||||
One of the many great parts of React is how it makes you think about apps as you build them. In this post I'll walk you through the thought process of building a searchable product data table using React.
|
||||
|
||||
## Start with a mock
|
||||
|
||||
Imagine that we already have a JSON API and a mock from our designer. Our designer apparently isn't very good because the mock looks like this:
|
||||
|
||||

|
||||
|
||||
Our JSON API returns some data that looks like this:
|
||||
|
||||
```
|
||||
[
|
||||
{category: "Sporting Goods", price: "$49.99", stocked: true, name: "Football"},
|
||||
{category: "Sporting Goods", price: "$9.99", stocked: true, name: "Baseball"},
|
||||
{category: "Sporting Goods", price: "$29.99", stocked: false, name: "Basketball"},
|
||||
{category: "Electronics", price: "$99.99", stocked: true, name: "iPod Touch"},
|
||||
{category: "Electronics", price: "$399.99", stocked: false, name: "iPhone 5"},
|
||||
{category: "Electronics", price: "$199.99", stocked: true, name: "Nexus 7"}
|
||||
];
|
||||
```
|
||||
|
||||
## Step 1: break the UI into a component hierarchy
|
||||
|
||||
The first thing you'll want to do is to draw boxes around every component (and subcomponent) in the mock and give them all names. If you're working with a designer they may have already done this, so go talk to them! Their Photoshop layer names may end up being the names of your React components!
|
||||
|
||||
But how do you know what should be its own component? Just use the same techniques for deciding if you should create a new function or object. One such technique is the [single responsibility principle](http://en.wikipedia.org/wiki/Single_responsibility_principle), that is, a component should ideally only do one thing. If it ends up growing it should be decomposed into smaller subcomponents.
|
||||
|
||||
Since you're often displaying a JSON data model to a user, you'll find that if your model was built correctly your UI (and therefore your component structure) will map nicely onto it. That's because user interfaces and data models tend to adhere to the same *information architecture* which means the work of separating your UI into components is often trivial. Just break it up into components that represent exactly one piece of your data model.
|
||||
|
||||

|
||||
|
||||
You'll see here that we have five components in our simple app. I've italicized the data each component represents.
|
||||
|
||||
1. **`FilterableProductTable` (orange):** contains the entirety of the example
|
||||
2. **`SearchBar` (blue):** receives all *user input*
|
||||
3. **`ProductTable` (green):** displays and filters the *data collection* based on *user input*
|
||||
4. **`ProductCategoryRow` (turquoise):** displays a heading for each *category*
|
||||
5. **`ProductRow` (red):** displays a row for each *product*
|
||||
|
||||
If you look at `ProductTable` you'll see that the table header (containing the "Name" and "Price" labels) isn't its own component. This is a matter of preference and there's an argument to be made either way. For this example I left it as part of `ProductTable` because it is part of rendering the *data collection* which is `ProductTable`'s responsibility. However if this header grows to be complex (i.e. if we were to add affordances for sorting) it would certainly make sense to make this its own `ProductTableHeader` component.
|
||||
|
||||
Now that we've identified the components in our mock, let's arrange them into a hierarchy. This is easy. Components that appear within another component in the mock should appear as a child in the hierarchy:
|
||||
|
||||
* `FilterableProductTable`
|
||||
* `SearchBar`
|
||||
* `ProductTable`
|
||||
* `ProductCategoryRow`
|
||||
* `ProductRow`
|
||||
|
||||
## Step 2: Build a static version in React
|
||||
|
||||
<iframe width="100%" height="300" src="https://jsfiddle.net/6wQMG/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
|
||||
|
||||
Now that you have your component hierarchy it's time to start implementing your app. The easiest way is to build a version that takes your data model and renders the UI but has no interactivity. It's easiest to decouple these processes because building a static version requires a lot of typing and no thinking, and adding interactivity requires a lot of thinking and not a lot of typing. We'll see why.
|
||||
|
||||
To build a static version of your app that renders your data model you'll want to build components that reuse other components and pass data using *props*. *props* are a way of passing data from parent to child. If you're familiar with the concept of *state*, **don't use state at all** to build this static version. State is reserved only for interactivity, that is, data that changes over time. Since this is a static version of the app you don't need it.
|
||||
|
||||
You can build top-down or bottom-up. That is, you can either start with building the components higher up in the hierarchy (i.e. starting with `FilterableProductTable`) or with the ones lower in it (`ProductRow`). In simpler examples it's usually easier to go top-down and on larger projects it's easier to go bottom-up and write tests as you build.
|
||||
|
||||
At the end of this step you'll have a library of reusable components that render your data model. The components will only have `render()` methods since this is a static version of your app. The component at the top of the hierarchy (`FilterableProductTable`) will take your data model as a prop. If you make a change to your underlying data model and call `renderComponent()` again the UI will be updated. It's easy to see how your UI is updated and where to make changes since there's nothing complicated going on since React's **one-way data flow** (also called *one-way binding*) keeps everything modular, easy to reason about, and fast.
|
||||
|
||||
Simply refer to the [React docs](http://facebook.github.io/react/docs/) if you need help executing this step.
|
||||
|
||||
### A brief interlude: props vs state
|
||||
|
||||
There are two types of "model" data in React: props and state. It's important to understand the distinction between the two; skim [the official React docs](http://facebook.github.io/react/docs/interactivity-and-dynamic-uis.html) if you aren't sure what the difference is.
|
||||
|
||||
## Step 3: Identify the minimal (but complete) representation of UI state
|
||||
|
||||
To make your UI interactive you need to be able to trigger changes to your underlying data model. React makes this easy with **state**.
|
||||
|
||||
To build your app correctly you first need to think of the minimal set of mutable state that your app needs. The key here is DRY: *Don't Repeat Yourself*. Figure out what the absolute minimal representation of the state of your application needs to be and compute everything else you need on-demand. For example, if you're building a TODO list, just keep an array of the TODO items around; don't keep a separate state variable for the count. Instead, when you want to render the TODO count simply take the length of the TODO items array.
|
||||
|
||||
Think of all of the pieces of data in our example application. We have:
|
||||
|
||||
* The original list of products
|
||||
* The search text the user has entered
|
||||
* The value of the checkbox
|
||||
* The filtered list of products
|
||||
|
||||
Let's go through each one and figure out which one is state. Simply ask three questions about each piece of data:
|
||||
|
||||
1. Is it passed in from a parent via props? If so, it probably isn't state.
|
||||
2. Does it change over time? If not, it probably isn't state.
|
||||
3. Can you compute it based on any other state or props in your component? If so, it's not state.
|
||||
|
||||
The original list of products is passed in as props, so that's not state. The search text and the checkbox seem to be state since they change over time and can't be computed from anything. And finally, the filtered list of products isn't state because it can be computed by combining the original list of products with the search text and value of the checkbox.
|
||||
|
||||
So finally, our state is:
|
||||
|
||||
* The search text the user has entered
|
||||
* The value of the checkbox
|
||||
|
||||
## Step 4: Identify where your state should live
|
||||
|
||||
<iframe width="100%" height="300" src="https://jsfiddle.net/QvHnx/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
|
||||
|
||||
OK, so we've identified what the minimal set of app state is. Next we need to identify which component mutates, or *owns*, this state.
|
||||
|
||||
Remember: React is all about one-way data flow down the component hierarchy. It may not be immediately clear which component should own what state. **This is often the most challenging part for newcomers to understand,** so follow these steps to figure it out:
|
||||
|
||||
For each piece of state in your application:
|
||||
|
||||
* Identify every component that renders something based on that state.
|
||||
* Find a common owner component (a single component above all the components that need the state in the hierarchy).
|
||||
* Either the common owner or another component higher up in the hierarchy should own the state.
|
||||
* If you can't find a component where it makes sense to own the state, create a new component simply for holding the state and add it somewhere in the hierarchy above the common owner component.
|
||||
|
||||
Let's run through this strategy for our application:
|
||||
|
||||
* `ProductTable` needs to filter the product list based on state and `SearchBar` needs to display the search text and checked state.
|
||||
* The common owner component is `FilterableProductTable`.
|
||||
* It conceptually makes sense for the filter text and checked value to live in `FilterableProductTable`
|
||||
|
||||
Cool, so we've decided that our state lives in `FilterableProductTable`. First, add a `getInitialState()` method to `FilterableProductTable` that returns `{filterText: '', inStockOnly: false}` to reflect the initial state of your application. Then pass `filterText` and `inStockOnly` to `ProductTable` and `SearchBar` as a prop. Finally, use these props to filter the rows in `ProductTable` and set the values of the form fields in `SearchBar`.
|
||||
|
||||
You can start seeing how your application will behave: set `filterText` to `"ball"` and refresh your app. You'll see the data table is updated correctly.
|
||||
|
||||
## Step 5: Add inverse data flow
|
||||
|
||||
<iframe width="100%" height="300" src="https://jsfiddle.net/3Vs3Q/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
|
||||
|
||||
So far we've built an app that renders correctly as a function of props and state flowing down the hierarchy. Now it's time to support data flowing the other way: the form components deep in the hierarchy need to update the state in `FilterableProductTable`.
|
||||
|
||||
React makes this data flow explicit to make it easy to understand how your program works, but it does require a little more typing than traditional two-way data binding. React provides an add-on called `ReactLink` to make this pattern as convenient as two-way binding, but for the purpose of this post we'll keep everything explicit.
|
||||
|
||||
If you try to type or check the box in the current version of the example you'll see that React ignores your input. This is intentional, as we've set the `value` prop of the `input` to always be equal to the `state` passed in from `FilterableProductTable`.
|
||||
|
||||
Let's think about what we want to happen. We want to make sure that whenever the user changes the form we update the state to reflect the user input. Since components should only update their own state, `FilterableProductTable` will pass a callback to `SearchBar` that will fire whenever the state should be updated. We can use the `onChange` event on the inputs to be notified of it. And the callback passed by `FilterableProductTable` will call `setState()` and the app will be updated.
|
||||
|
||||
Though this sounds like a lot it's really just a few lines of code. And it's really explicit how your data is flowing throughout the app.
|
||||
|
||||
## And that's it
|
||||
|
||||
Hopefully this gives you an idea of how to think about building components and applications with React. While it may be a little more typing than you're used to, remember that code is read far more than it's written, and it's extremely easy to read this modular, explicit code. As you start to build large libraries of components you'll appreciate this explicitness and modularity, and with code reuse your lines of code will start to shrink :)
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Community Round-up #10"
|
||||
author: vjeux
|
||||
author: Vjeux
|
||||
---
|
||||
|
||||
This is the 10th round-up already and React has come quite far since it was open sourced. Almost all new web projects at Khan Academy, Facebook, and Instagram are being developed using React. React has been deployed in a variety of contexts: a Chrome extension, a Windows 8 application, mobile websites, and desktop websites supporting Internet Explorer 8! Language-wise, React is not only being used within JavaScript but also CoffeeScript and ClojureScript.
|
||||
@@ -26,7 +26,7 @@ The best part is that no drastic changes have been required to support all those
|
||||
|
||||
[Pete Hunt](http://www.petehunt.net/)'s talk at JSConf EU 2013 is now available in video.
|
||||
|
||||
<figure><iframe width="100%" height="370" src="//www.youtube-nocookie.com/embed/x7cQ3mrcKaY" frameborder="0" allowfullscreen></iframe></figure>
|
||||
<figure><iframe width="600" height="370" src="//www.youtube.com/embed/x7cQ3mrcKaY" frameborder="0" allowfullscreen></iframe></figure>
|
||||
|
||||
|
||||
## Server-side React with PHP
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Community Round-up #11"
|
||||
author: vjeux
|
||||
author: Vjeux
|
||||
---
|
||||
|
||||
This round-up is the proof that React has taken off from its Facebook's root: it features three in-depth presentations of React done by external people. This is awesome, keep them coming!
|
||||
@@ -9,25 +9,25 @@ This round-up is the proof that React has taken off from its Facebook's root: it
|
||||
|
||||
[Steve Luscher](https://github.com/steveluscher) working at [LeanPub](https://leanpub.com/) made a 30 min talk at [Super VanJS](https://twitter.com/vanjs). He does a remarkable job at explaining why React is so fast with very exciting demos using the HTML5 Audio API.
|
||||
|
||||
<figure><iframe width="100%" height="338" src="//www.youtube-nocookie.com/embed/1OeXsL5mr4g" frameborder="0" allowfullscreen></iframe></figure>
|
||||
<figure><iframe width="600" height="338" src="//www.youtube.com/embed/1OeXsL5mr4g" frameborder="0" allowfullscreen></iframe></figure>
|
||||
|
||||
|
||||
## React Tips
|
||||
|
||||
[Connor McSheffrey](http://connormcsheffrey.com/) and [Cheng Lou](https://github.com/chenglou) added a new section to the documentation. It's a list of small tips that you will probably find useful while working on React. Since each article is very small and focused, we [encourage you to contribute](/react/tips/introduction.html)!
|
||||
[Connor McSheffrey](http://connormcsheffrey.com/) and [Cheng Lou](https://github.com/chenglou) added a new section to the documentation. It's a list of small tips that you will probably find useful while working on React. Since each article is very small and focused, we [encourage you to contribute](http://facebook.github.io/react/tips/introduction.html)!
|
||||
|
||||
- [Inline Styles](/react/tips/inline-styles.html)
|
||||
- [If-Else in JSX](/react/tips/if-else-in-JSX.html)
|
||||
- [Self-Closing Tag](/react/tips/self-closing-tag.html)
|
||||
- [Maximum Number of JSX Root Nodes](/react/tips/maximum-number-of-jsx-root-nodes.html)
|
||||
- [Shorthand for Specifying Pixel Values in style props](/react/tips/style-props-value-px.html)
|
||||
- [Type of the Children props](/react/tips/children-props-type.html)
|
||||
- [Value of null for Controlled Input](/react/tips/controlled-input-null-value.html)
|
||||
- [`componentWillReceiveProps` Not Triggered After Mounting](/react/tips/componentWillReceiveProps-not-triggered-after-mounting.html)
|
||||
- [Props in getInitialState Is an Anti-Pattern](/react/tips/props-in-getInitialState-as-anti-pattern.html)
|
||||
- [DOM Event Listeners in a Component](/react/tips/dom-event-listeners.html)
|
||||
- [Load Initial Data via AJAX](/react/tips/initial-ajax.html)
|
||||
- [False in JSX](/react/tips/false-in-jsx.html)
|
||||
- [Inline Styles](http://facebook.github.io/react/tips/inline-styles.html)
|
||||
- [If-Else in JSX](http://facebook.github.io/react/tips/if-else-in-JSX.html)
|
||||
- [Self-Closing Tag](http://facebook.github.io/react/tips/self-closing-tag.html)
|
||||
- [Maximum Number of JSX Root Nodes](http://facebook.github.io/react/tips/maximum-number-of-jsx-root-nodes.html)
|
||||
- [Shorthand for Specifying Pixel Values in style props](http://facebook.github.io/react/tips/style-props-value-px.html)
|
||||
- [Type of the Children props](http://facebook.github.io/react/tips/children-props-type.html)
|
||||
- [Value of null for Controlled Input](http://facebook.github.io/react/tips/controlled-input-null-value.html)
|
||||
- [`componentWillReceiveProps` Not Triggered After Mounting](http://facebook.github.io/react/tips/componentWillReceiveProps-not-triggered-after-mounting.html)
|
||||
- [Props in getInitialState Is an Anti-Pattern](http://facebook.github.io/react/tips/props-in-getInitialState-as-anti-pattern.html)
|
||||
- [DOM Event Listeners in a Component](http://facebook.github.io/react/tips/dom-event-listeners.html)
|
||||
- [Load Initial Data via AJAX](http://facebook.github.io/react/tips/initial-ajax.html)
|
||||
- [False in JSX](http://facebook.github.io/react/tips/false-in-jsx.html)
|
||||
|
||||
|
||||
## Intro to the React Framework
|
||||
@@ -50,7 +50,7 @@ This round-up is the proof that React has taken off from its Facebook's root: it
|
||||
|
||||
## Genesis Skeleton
|
||||
|
||||
[Eric Clemmons](https://ericclemmons.github.io/) is working on a "Modern, opinionated, full-stack starter kit for rapid, streamlined application development". The version 0.4.0 has just been released and has first-class support for React.
|
||||
[Eric Clemmons](http://ericclemmons.github.io/) is working on a "Modern, opinionated, full-stack starter kit for rapid, streamlined application development". The version 0.4.0 has just been released and has first-class support for React.
|
||||
<figure>[](http://genesis-skeleton.com/)</figure>
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ This round-up is the proof that React has taken off from its Facebook's root: it
|
||||
>
|
||||
> [Read the full article...](http://rz.scale-it.pl/2013/10/20/frontend_components_in_react.html)
|
||||
|
||||
<figure><iframe src="https://docs.google.com/presentation/d/1JSFbjCuuexwOHCeHWBMNRIJdyfD2Z0ZQwX65WOWkfaI/embed?start=false" frameborder="0" width="100%" height="468" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"> </iframe></figure>
|
||||
<figure><iframe src="https://docs.google.com/presentation/d/1JSFbjCuuexwOHCeHWBMNRIJdyfD2Z0ZQwX65WOWkfaI/embed?start=false" frameborder="0" width="600" height="468" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"> </iframe></figure>
|
||||
|
||||
|
||||
## JSX
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "React v0.5.2, v0.4.2"
|
||||
author: zpao
|
||||
author: Paul O'Shannessy
|
||||
---
|
||||
|
||||
Today we're releasing an update to address a potential XSS vulnerability that can arise when using user data as a `key`. Typically "safe" data is used for a `key`, for example, an id from your database, or a unique hash. However there are cases where it may be reasonable to use user generated content. A carefully crafted piece of content could result in arbitrary JS execution. While we make a very concerted effort to ensure all text is escaped before inserting it into the DOM, we missed one case. Immediately following the discovery of this vulnerability, we performed an audit to ensure we this was the only such vulnerability.
|
||||
@@ -15,7 +15,7 @@ While we've encouraged responsible disclosure as part of [Facebook's whitehat bo
|
||||
|
||||
You can learn more about the vulnerability discussed here: [CVE-2013-7035][cve].
|
||||
|
||||
[download]: /react/downloads.html
|
||||
[download]: http://facebook.github.io/react/downloads.html
|
||||
[bounty]: https://www.facebook.com/whitehat/
|
||||
[ember]: http://emberjs.com/security/
|
||||
[cve]: https://groups.google.com/forum/#!topic/reactjs/OIqxlB2aGfU
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "React v0.8"
|
||||
author: zpao
|
||||
author: Paul O'Shannessy
|
||||
---
|
||||
|
||||
I'll start by answering the obvious question:
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
---
|
||||
title: "Community Round-up #12"
|
||||
author: vjeux
|
||||
author: Vjeux
|
||||
---
|
||||
|
||||
React got featured on the front-page of Hacker News thanks to the Om library. If you try it out for the first time, take a look at the [docs](/react/docs/getting-started.html) and do not hesitate to ask questions on the [Google Group](https://groups.google.com/group/reactjs), [IRC](irc://chat.freenode.net/reactjs) or [Stack Overflow](http://stackoverflow.com/questions/tagged/reactjs). We are trying our best to help you out!
|
||||
React got featured on the front-page of Hacker News thanks to the Om library. If you try it out for the first time, take a look at the [docs](/react/docs/getting-started.html) and do not hesitate to ask questions on the [Google Group](http://groups.google.com/group/reactjs), [IRC](irc://chat.freenode.net/reactjs) or [Stack Overflow](http://stackoverflow.com/questions/tagged/reactjs). We are trying our best to help you out!
|
||||
|
||||
## The Future of Javascript MVC
|
||||
|
||||
[David Nolen](https://swannodette.github.io/) announced Om, a thin wrapper on-top of React in ClojureScript. It stands out by only using immutable data structures. This unlocks the ability to write a very efficient [shouldComponentUpdate](/react/docs/component-specs.html#updating-shouldcomponentupdate) and get huge performance improvements on some tasks.
|
||||
[David Nolen](http://swannodette.github.io/) announced Om, a thin wrapper on-top of React in ClojureScript. It stands out by only using immutable data structures. This unlocks the ability to write a very efficient [shouldComponentUpdate](http://facebook.github.io/react/docs/component-specs.html#updating-shouldcomponentupdate) and get huge performance improvements on some tasks.
|
||||
|
||||
> We've known this for some time over here in the ClojureScript corner of the world - all of our collections are immutable and modeled directly on the original Clojure versions written in Java. Modern JavaScript engines have now been tuned to the point that it's no longer uncommon to see collection performance within 2.5X of the Java Virtual Machine.
|
||||
>
|
||||
> Wait, wait, wait. What does the performance of persistent data structures have to do with the future of JavaScript MVCs?
|
||||
>
|
||||
> A whole lot.
|
||||
> <figure>[](https://swannodette.github.io/2013/12/17/the-future-of-javascript-mvcs/)</figure>
|
||||
> <figure>[](http://swannodette.github.io/2013/12/17/the-future-of-javascript-mvcs/)</figure>
|
||||
>
|
||||
> [Read the full article...](https://swannodette.github.io/2013/12/17/the-future-of-javascript-mvcs/)
|
||||
> [Read the full article...](http://swannodette.github.io/2013/12/17/the-future-of-javascript-mvcs/)
|
||||
|
||||
|
||||
|
||||
## Scroll Position with React
|
||||
|
||||
Managing the scroll position when new content is inserted is usually very tricky to get right. [Vjeux](http://blog.vjeux.com/) discovered that [componentWillUpdate](/react/docs/component-specs.html#updating-componentwillupdate) and [componentDidUpdate](/react/docs/component-specs.html#updating-componentdidupdate) were triggered exactly at the right time to manage the scroll position.
|
||||
Managing the scroll position when new content is inserted is usually very tricky to get right. [Vjeux](http://blog.vjeux.com/) discovered that [componentWillUpdate](http://facebook.github.io/react/docs/component-specs.html#updating-componentwillupdate) and [componentDidUpdate](http://facebook.github.io/react/docs/component-specs.html#updating-componentdidupdate) were triggered exactly at the right time to manage the scroll position.
|
||||
|
||||
> We can check the scroll position before the component has updated with componentWillUpdate and scroll if necessary at componentDidUpdate
|
||||
>
|
||||
@@ -45,10 +45,10 @@ componentDidUpdate: function() {
|
||||
|
||||
## Lights Out
|
||||
|
||||
React declarative approach is well suited to write games. [Cheng Lou](https://github.com/chenglou) wrote the famous Lights Out game in React. It's a good example of use of [TransitionGroup](/react/docs/animation.html) to implement animations.
|
||||
<figure>[](https://chenglou.github.io/react-lights-out/)</figure>
|
||||
React declarative approach is well suited to write games. [Cheng Lou](https://github.com/chenglou) wrote the famous Lights Out game in React. It's a good example of use of [TransitionGroup](http://facebook.github.io/react/docs/animation.html) to implement animations.
|
||||
<figure>[](http://chenglou.github.io/react-lights-out/)</figure>
|
||||
|
||||
[Try it out!](https://chenglou.github.io/react-lights-out/)
|
||||
[Try it out!](http://chenglou.github.io/react-lights-out/)
|
||||
|
||||
|
||||
## Reactive Table Bookmarklet
|
||||
@@ -63,7 +63,9 @@ React declarative approach is well suited to write games. [Cheng Lou](https://gi
|
||||
|
||||
[Ross Allen](https://twitter.com/ssorallen) implemented [MontageJS](http://montagejs.org/)'s [Reddit tutorial](http://montagejs.org/docs/tutorial-reddit-client-with-montagejs.html) in React. This is a good opportunity to compare the philosophies of the two libraries.
|
||||
|
||||
[View the source on JSFiddle...](https://jsfiddle.net/ssorallen/fEsYt/)
|
||||
<iframe width="100%" height="300" src="https://jsfiddle.net/ssorallen/fEsYt/embedded/result,html,js" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
|
||||
|
||||
[View the source on JSFiddle...](http://jsfiddle.net/ssorallen/fEsYt/)
|
||||
|
||||
## Writing Good React Components
|
||||
|
||||
@@ -91,9 +93,9 @@ hoodie new todomvc -t "hoodiehq/hoodie-react-todomvc"
|
||||
## JSX Compiler
|
||||
|
||||
Ever wanted to have a quick way to see what a JSX tag would be converted to? [Tim Yung](http://www.yungsters.com/) made a page for it.
|
||||
<figure>[](/react/jsx-compiler.html)</figure>
|
||||
<figure>[](http://facebook.github.io/react/jsx-compiler.html)</figure>
|
||||
|
||||
[Try it out!](/react/jsx-compiler.html)
|
||||
[Try it out!](http://facebook.github.io/react/jsx-compiler.html)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Community Round-up #13"
|
||||
author: vjeux
|
||||
author: Vjeux
|
||||
---
|
||||
|
||||
Happy holidays! This blog post is a little-late Christmas present for all the React users. Hopefully it will inspire you to write awesome web apps in 2014!
|
||||
@@ -10,16 +10,16 @@ Happy holidays! This blog post is a little-late Christmas present for all the Re
|
||||
|
||||
[Pete Hunt](http://www.petehunt.net/) wrote three demos showing that React can be used to run 60fps native-like experiences on mobile web. A frosted glass effect, an image gallery with 3d animations and an infinite scroll view.
|
||||
|
||||
<figure><iframe src="//player.vimeo.com/video/79659941" width="100%" height="400" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></figure>
|
||||
<figure><iframe src="//player.vimeo.com/video/79659941" width="220" height="400" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></figure>
|
||||
|
||||
[Try out the demos!](https://petehunt.github.io/react-touch/)
|
||||
[Try out the demos!](http://petehunt.github.io/react-touch/)
|
||||
|
||||
|
||||
## Introduction to React
|
||||
|
||||
[Stoyan Stefanov](http://www.phpied.com/) talked at Joe Dev On Tech about React. He goes over all the features of the library and ends with a concrete example.
|
||||
|
||||
<figure><iframe width="100%" height="315" src="//www.youtube-nocookie.com/embed/SMMRJif5QW0" frameborder="0" allowfullscreen></iframe></figure>
|
||||
<figure><iframe width="560" height="315" src="//www.youtube.com/embed/SMMRJif5QW0" frameborder="0" allowfullscreen></iframe></figure>
|
||||
|
||||
|
||||
## JSX: E4X The Good Parts
|
||||
@@ -115,3 +115,4 @@ var MyComponent = React.createClass({
|
||||
## Random Tweet
|
||||
|
||||
<center><blockquote class="twitter-tweet" lang="en"><p>I may be starting to get annoying with this, but ReactJS is really exciting. I truly feel the virtual DOM is a game changer.</p>— Eric Florenzano (@ericflo) <a href="https://twitter.com/ericflo/statuses/413842834974732288">December 20, 2013</a></blockquote></center>
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
title: "React Chrome Developer Tools"
|
||||
author: sebmarkbage
|
||||
author: Sebastian Markbåge
|
||||
---
|
||||
|
||||
With the new year, we thought you'd enjoy some new tools for debugging React code. Today we're releasing the [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi), an extension to the Chrome Developer Tools. [Download them from the Chrome Web Store](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi).
|
||||
|
||||
<figure><iframe width="100%" height="315" src="//www.youtube-nocookie.com/embed/Cey7BS6dE0M" frameborder="0" allowfullscreen></iframe></figure>
|
||||
<figure><iframe width="560" height="315" src="//www.youtube.com/embed/Cey7BS6dE0M" frameborder="0" allowfullscreen></iframe></figure>
|
||||
|
||||
You will get a new tab titled "React" in your Chrome DevTools. This tab shows you a list of the root React Components that are rendered on the page as well as the subcomponents that each root renders.
|
||||
|
||||
@@ -15,3 +15,4 @@ When you inspect a DOM element using the regular Elements tab, you can switch ov
|
||||
<figure>[](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi)</figure>
|
||||
|
||||
We hope these tools will help your team better understand your component hierarchy and track down bugs. We're very excited about this initial launch and appreciate any feedback you may have. As always, we also accept [pull requests on GitHub](https://github.com/facebook/react-devtools).
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Community Round-up #14"
|
||||
author: vjeux
|
||||
author: Vjeux
|
||||
---
|
||||
|
||||
The theme of this first round-up of 2014 is integration. I've tried to assemble a list of articles and projects that use React in various environments.
|
||||
@@ -13,7 +13,7 @@ React is only one-piece of your web application stack. [Mark Lussier](https://gi
|
||||
>
|
||||
> I encourage you to fork, and make it right and submit a pull request!
|
||||
>
|
||||
> My current opinion is using tools like Grunt, Browserify, Bower and multiple grunt plugins to get the job done. I also opted for Zepto over jQuery and the Flatiron Project's Director when I need a router. Oh and for the last little bit of tech that makes you mad, I am in the SASS camp when it comes to stylesheets
|
||||
> My current opinion is using tools like Grunt, Browserify, Bower and mutiple grunt plugins to get the job done. I also opted for Zepto over jQuery and the Flatiron Project's Director when I need a router. Oh and for the last little bit of tech that makes you mad, I am in the SASS camp when it comes to stylesheets
|
||||
>
|
||||
> [Check it out on GitHub...](https://github.com/intabulas/reactjs-baseline)
|
||||
|
||||
@@ -28,7 +28,7 @@ React is only one-piece of your web application stack. [Mark Lussier](https://gi
|
||||
|
||||
## React Rails Tutorial
|
||||
|
||||
[Selem Delul](http://selem.im) bundled the [React Tutorial](/react/tutorial/tutorial.html) into a rails app. This is a good example on how to get started with a rails project.
|
||||
[Selem Delul](http://selem.im) bundled the [React Tutorial](http://facebook.github.io/react/docs/tutorial.html) into a rails app. This is a good example on how to get started with a rails project.
|
||||
|
||||
> ```
|
||||
git clone https://github.com/necrodome/react-rails-tutorial
|
||||
@@ -45,7 +45,7 @@ rails s
|
||||
|
||||
[Eldar Djafarov](http://eldar.djafarov.com/) implemented a mixin to link Backbone models to React state and a small abstraction to write two-way binding on-top.
|
||||
|
||||
[View code on JSFiddle](http://jsfiddle.net/djkojb/qZf48/13/)
|
||||
<iframe width="100%" height="300" src="https://jsfiddle.net/djkojb/qZf48/13/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
|
||||
|
||||
[Check out the blog post...](http://eldar.djafarov.com/2013/11/reactjs-mixing-with-backbone/)
|
||||
|
||||
@@ -71,7 +71,8 @@ rails s
|
||||
|
||||
[Thomas Aylott](http://subtlegradient.com/) implemented an API that looks like Web Components but using React underneath.
|
||||
|
||||
[View the source on JSFiddle...](http://jsfiddle.net/SubtleGradient/ue2Aa)
|
||||
<iframe width="100%" height="300" src="https://jsfiddle.net/SubtleGradient/ue2Aa/embedded/html,js,result" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
|
||||
|
||||
|
||||
## React vs Angular
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
title: "Community Round-up #15"
|
||||
author: jgebhardt
|
||||
author: Jonas Gebhardt
|
||||
---
|
||||
|
||||
Interest in React seems to have surged ever since David Nolen ([@swannodette](https://twitter.com/swannodette))'s introduction of [Om](https://github.com/swannodette/om) in his post ["The Future of Javascript MVC Frameworks"](https://swannodette.github.io/2013/12/17/the-future-of-javascript-mvcs/).
|
||||
Interest in React seems to have surged ever since David Nolen ([@swannodette](https://twitter.com/swannodette))'s introduction of [Om](https://github.com/swannodette/om) in his post ["The Future of Javascript MVC Frameworks"](http://swannodette.github.io/2013/12/17/the-future-of-javascript-mvcs/).
|
||||
|
||||
In this React Community Round-up, we are taking a closer look at React from a functional programming perspective.
|
||||
|
||||
@@ -15,13 +15,13 @@ To start things off, Eric Normand ([@ericnormand](https://twitter.com/ericnorman
|
||||
> [Read the full post...](http://www.lispcast.com/react-another-level-of-indirection)
|
||||
|
||||
## Reagent: Minimalistic React for ClojureScript
|
||||
Dan Holmsand ([@holmsand](https://twitter.com/holmsand)) created [Reagent](https://holmsand.github.io/reagent/), a simplistic ClojureScript API to React.
|
||||
Dan Holmsand ([@holmsand](https://twitter.com/holmsand)) created [Reagent](http://holmsand.github.io/reagent/), a simplistic ClojureScript API to React.
|
||||
|
||||
> It allows you to define efficient React components using nothing but plain ClojureScript functions and data, that describe your UI using a Hiccup-like syntax.
|
||||
>
|
||||
> The goal of Reagent is to make it possible to define arbitrarily complex UIs using just a couple of basic concepts, and to be fast enough by default that you rarely have to care about performance.
|
||||
>
|
||||
> [Check it out on Github...](https://holmsand.github.io/reagent/)
|
||||
> [Check it out on Github...](http://holmsand.github.io/reagent/)
|
||||
|
||||
|
||||
## Functional DOM programming
|
||||
@@ -34,7 +34,7 @@ React's one-way data-binding naturally lends itself to a functional programming
|
||||
|
||||
Pete also explains this in detail at his #MeteorDevShop talk (about 30 Minutes):
|
||||
|
||||
<iframe width="100%" height="315" src="//www.youtube-nocookie.com/embed/Lqcs6hPOcFw?start=2963" frameborder="0" allowfullscreen></iframe>
|
||||
<iframe width="560" height="315" src="//www.youtube.com/embed/Lqcs6hPOcFw?start=2963" frameborder="0" allowfullscreen></iframe>
|
||||
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ In a separate post, Dyrkell breaks down [how to build a binary clock component](
|
||||
[[Demo](http://www.lexicallyscoped.com/demo/binclock/)] [[Code](https://github.com/fredyr/binclock/blob/master/src/binclock/core.cljs)]
|
||||
|
||||
### Time Travel: Implementing undo in Om
|
||||
David Nolen shows how to leverage immutable data structures to [add global undo](https://swannodette.github.io/2013/12/31/time-travel/) functionality to an app – using just 13 lines of ClojureScript.
|
||||
David Nolen shows how to leverage immutable data structures to [add global undo](http://swannodette.github.io/2013/12/31/time-travel/) functionality to an app – using just 13 lines of ClojureScript.
|
||||
|
||||
### A Step-by-Step Om Walkthrough
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Community Round-up #16"
|
||||
author: jgebhardt
|
||||
author: Jonas Gebhardt
|
||||
---
|
||||
|
||||
There have been many posts recently covering the <i>why</i> and <i>how</i> of React. This week's community round-up includes a collection of recent articles to help you get started with React, along with a few posts that explain some of the inner workings.
|
||||
@@ -9,7 +9,7 @@ There have been many posts recently covering the <i>why</i> and <i>how</i> of Re
|
||||
## React in a nutshell
|
||||
Got five minutes to pitch React to your coworkers? John Lynch ([@johnrlynch](https://twitter.com/johnrlynch)) put together [this excellent and refreshing slideshow](http://slid.es/johnlynch/reactjs):
|
||||
|
||||
<iframe src="//slid.es/johnlynch/reactjs/embed" width="100%" height="420" scrolling="no" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
||||
<iframe src="//slid.es/johnlynch/reactjs/embed" width="576" height="420" scrolling="no" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
||||
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ It's great to see the React community expand internationally. [This site](http:/
|
||||
|
||||
### Egghead.io video tutorials
|
||||
|
||||
Joe Maddalone ([@joemaddalone](https://twitter.com/joemaddalone)) of [egghead.io](https://egghead.io/) created a series of React video tutorials, such as [this](http://www.youtube-nocookie.com/v/rFvZydtmsxM) introduction to React Components. [[part 1](http://www.youtube-nocookie.com/v/rFvZydtmsxM)], [[part 2](http://www.youtube-nocookie.com/v/5yvFLrt7N8M)]
|
||||
Joe Maddalone ([@joemaddalone](https://twitter.com/joemaddalone)) of [egghead.io](https://egghead.io/) created a series of React video tutorials, such as [this](http://www.youtube.com/watch?v=rFvZydtmsxM&feature=youtu.be&a) introduction to React Components. [[part 1](http://www.youtube.com/watch?v=rFvZydtmsxM&feature=youtu.be&a)], [[part 2](http://www.youtube.com/watch?v=5yvFLrt7N8M)]
|
||||
|
||||
### "React: Finally, a great server/client web stack"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: React v0.9 RC
|
||||
author: spicyj
|
||||
author: Ben Alpert
|
||||
---
|
||||
|
||||
We're almost ready to release React v0.9! We're posting a release candidate so that you can test your apps on it; we'd much prefer to find show-stopping bugs now rather than after we release.
|
||||
@@ -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:
|
||||
|
||||
* **React**
|
||||
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>
|
||||
Dev build with warnings: <http://fb.me/react-0.9.0-rc1.js>
|
||||
Minified build for production: <http://fb.me/react-0.9.0-rc1.min.js>
|
||||
* **React with Add-Ons**
|
||||
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>
|
||||
Dev build with warnings: <http://fb.me/react-with-addons-0.9.0-rc1.js>
|
||||
Minified build for production: <http://fb.me/react-with-addons-0.9.0-rc1.min.js>
|
||||
* **In-Browser JSX transformer**
|
||||
<https://fb.me/JSXTransformer-0.9.0-rc1.js>
|
||||
<http://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.
|
||||
|
||||
@@ -49,7 +49,7 @@ React.DOM.div(null,
|
||||
)
|
||||
```
|
||||
|
||||
We believe this new behavior is more helpful and eliminates cases where unwanted whitespace was previously added.
|
||||
We believe this new behavior is more helpful and elimates cases where unwanted whitespace was previously added.
|
||||
|
||||
In cases where you want to preserve the space adjacent to a newline, you can write a JS string like `{"Monkeys: "}` in your JSX source. We've included a script to do an automated codemod of your JSX source tree that preserves the old whitespace behavior by adding and removing spaces appropriately. You can [install jsx\_whitespace\_transformer from npm](https://github.com/facebook/react/blob/master/npm-jsx_whitespace_transformer/README.md) and run it over your source tree to modify files in place. The transformed JSX files will preserve your code's existing whitespace behavior.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: React v0.9
|
||||
author: spicyj
|
||||
author: Ben Alpert
|
||||
---
|
||||
|
||||
I'm excited to announce that today we're releasing React v0.9, which incorporates many bug fixes and several new features since the last release. This release contains almost four months of work, including over 800 commits from over 70 committers!
|
||||
@@ -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:
|
||||
|
||||
* **React**
|
||||
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>
|
||||
Dev build with warnings: <http://fb.me/react-0.9.0.js>
|
||||
Minified build for production: <http://fb.me/react-0.9.0.min.js>
|
||||
* **React with Add-Ons**
|
||||
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>
|
||||
Dev build with warnings: <http://fb.me/react-with-addons-0.9.0.js>
|
||||
Minified build for production: <http://fb.me/react-with-addons-0.9.0.min.js>
|
||||
* **In-Browser JSX Transformer**
|
||||
<https://fb.me/JSXTransformer-0.9.0.js>
|
||||
<http://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.
|
||||
|
||||
@@ -57,7 +57,7 @@ React.DOM.div(null,
|
||||
)
|
||||
```
|
||||
|
||||
We believe this new behavior is more helpful and eliminates cases where unwanted whitespace was previously added.
|
||||
We believe this new behavior is more helpful and elimates cases where unwanted whitespace was previously added.
|
||||
|
||||
In cases where you want to preserve the space adjacent to a newline, you can write `{'Monkeys: '}` or `Monkeys:{' '}` in your JSX source. We've included a script to do an automated codemod of your JSX source tree that preserves the old whitespace behavior by adding and removing spaces appropriately. You can [install jsx\_whitespace\_transformer from npm](https://github.com/facebook/react/blob/master/npm-jsx_whitespace_transformer/README.md) and run it over your source tree to modify files in place. The transformed JSX files will preserve your code's existing whitespace behavior.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Community Round-up #17"
|
||||
author: jgebhardt
|
||||
author: Jonas Gebhardt
|
||||
---
|
||||
|
||||
|
||||
@@ -15,12 +15,12 @@ Large parts of Facebook's web frontend are already powered by React. The recentl
|
||||
Sberbank, Russia's largest bank, recently switched large parts of their site to use React, as detailed in [this post by Vyacheslav Slinko](https://groups.google.com/forum/#!topic/reactjs/Kj6WATX0atg).
|
||||
|
||||
### Relato
|
||||
[Relato](https://bripkens.github.io/relato/) by [Ben Ripkens](https://github.com/bripkens) shows Open Source Statistics based on npm data. It features a filterable and sortable table built in React. Check it out – it's super fast!
|
||||
[Relato](http://bripkens.github.io/relato/) by [Ben Ripkens](https://github.com/bripkens) shows Open Source Statistics based on npm data. It features a filterable and sortable table built in React. Check it out – it's super fast!
|
||||
|
||||
### Makona Editor
|
||||
|
||||
John Lynch ([@johnrlynch](https://twitter.com/johnrlynch)) created Makona, a block-style document editor for the web. Blocks of different content types comprise documents, authored using plain markup. At the switch of a toggle, block contents are then rendered on the page. While not quite a WYSIWYG editor, Makona uses plain textareas for input. This makes it compatible with a wider range of platforms than traditional rich text editors.
|
||||
<figure>[](https://johnthethird.github.io/makona-editor/)</figure>
|
||||
<figure>[](http://johnthethird.github.io/makona-editor/)</figure>
|
||||
|
||||
### Create Chrome extensions using React
|
||||
React is in no way limited to just web pages. Brandon Tilley ([@BinaryMuse](https://twitter.com/BinaryMuse)) just released a detailed walk-through of [how he built his Chrome extension "Fast Tab Switcher" using React](http://brandontilley.com/2014/02/24/creating-chrome-extensions-with-react.html).
|
||||
@@ -40,12 +40,12 @@ Javier Aguirre ([@javaguirre](https://twitter.com/javaguirre)) put together a si
|
||||
|
||||
|
||||
### SVG-based graphical node editor
|
||||
[NoFlo](http://noflojs.org/) and [Meemoo](http://meemoo.org/) developer [Forresto Oliphant](http://www.forresto.com/) built an awesome SVG-based [node editor](https://forresto.github.io/prototyping/react/) in React.
|
||||
<figure>[](https://forresto.github.io/prototyping/react/)</figure>
|
||||
[NoFlo](http://noflojs.org/) and [Meemoo](http://meemoo.org/) developer [Forresto Oliphant](http://www.forresto.com/) built an awesome SVG-based [node editor](http://forresto.github.io/prototyping/react/) in React.
|
||||
<figure>[](http://forresto.github.io/prototyping/react/)</figure>
|
||||
|
||||
|
||||
### Ultimate Tic-Tac-Toe Game in React
|
||||
Rafał Cieślak ([@Ravicious](https://twitter.com/Ravicious)) wrote a [React version](https://ravicious.github.io/ultimate-ttt/) of [Ultimate Tic Tac Toe](http://mathwithbaddrawings.com/2013/06/16/ultimate-tic-tac-toe/). Find the source [here](https://github.com/ravicious/ultimate-ttt).
|
||||
Rafał Cieślak ([@Ravicious](https://twitter.com/Ravicious)) wrote a [React version](http://ravicious.github.io/ultimate-ttt/) of [Ultimate Tic Tac Toe](http://mathwithbaddrawings.com/2013/06/16/ultimate-tic-tac-toe/). Find the source [here](https://github.com/ravicious/ultimate-ttt).
|
||||
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ Rafał Cieślak ([@Ravicious](https://twitter.com/Ravicious)) wrote a [React ver
|
||||
|
||||
Emanuele shared this awesome demo video with us:
|
||||
|
||||
<iframe width="100%" height="315" src="//www.youtube-nocookie.com/embed/jYcpaemt90M" frameborder="0" allowfullscreen></iframe>
|
||||
<iframe width="560" height="315" src="//www.youtube.com/embed/jYcpaemt90M" frameborder="0" allowfullscreen></iframe>
|
||||
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ Emanuele shared this awesome demo video with us:
|
||||
|
||||
|
||||
### Table Sorter
|
||||
[Table Sorter](https://bgerm.github.io/react-table-sorter-demo/) by [bgerm](https://github.com/bgerm) [[source](https://github.com/bgerm/react-table-sorter-demo)] is another helpful React component.
|
||||
[Table Sorter](http://bgerm.github.io/react-table-sorter-demo/) by [bgerm](https://github.com/bgerm) [[source](https://github.com/bgerm/react-table-sorter-demo)] is another helpful React component.
|
||||
|
||||
### Static-search
|
||||
|
||||
@@ -83,7 +83,7 @@ Dmitry Chestnykh [@dchest](https://twitter.com/dchest) wrote a [static search in
|
||||
|
||||
## React server rendering
|
||||
|
||||
Ever wonder how to pre-render React components on the server? [react-server-example](https://github.com/mhart/react-server-example) by Michael Hart ([@hichaelmart](https://twitter.com/hichaelmart)) walks through the necessary steps.
|
||||
Ever wonder how to pre-render React components on the server? [react-server-example](https://github.com/mhart/react-server-example) by Michael Hart ([@hichaelmart](http://twitter.com/hichaelmart)) walks through the necessary steps.
|
||||
|
||||
Similarly, Alan deLevie ([@adelevie](https://twitter.com/adelevie)) created [react-client-server-starter](https://github.com/adelevie/react-client-server-starter), another detailed walk-through of how to server-render your app.
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user