Sebastian Markbage
263800e09b
Fix isMounted inside of render
...
This is apparently used to determine if you can access refs.
Bad pattern, but a pattern nonetheless.
2015-02-04 11:50:04 -08:00
Paul O’Shannessy
99a2ef30ae
Merge pull request #3032 from germ13/patch-1
...
Corrected documentation
2015-02-04 11:46:27 -08:00
Paul O’Shannessy
f77e86834b
Merge pull request #3036 from jergason/master
...
Fix list formatting in glossary
2015-02-04 11:45:05 -08:00
Andreas Svensson
6672a7ec62
Merge pull request #2135 from syranide/ie8enctype
...
IE8 does not have a setter for property "enctype"
2015-02-04 13:47:54 +01:00
Andreas Svensson
8ca058ac4e
Split escapeTextForBrowser into escapeTextContentForBrowser and quoteAttributeValueForBrowser
2015-02-04 13:44:38 +01:00
Jamison Dance
d74d0e3215
Fix list formatting in glossary
2015-02-03 23:34:43 -07:00
juan serrano
3a0534e1b8
Corrected documentation
2015-02-03 18:41:47 -08:00
Lee Byron
9174501771
Merge pull request #2991 from leebyron/state-queue
...
Set state takes a function
2015-02-03 19:52:26 -05:00
Lee Byron
279b956c9b
Set state takes a function
...
This diff enables setState to accept a function in addition to a state partial. If you provide a function, it will be called with the up-to-date `state, props, context` as arguments.
This enables some nicer syntax for complex setState patterns:
If setState is doing an increment and wants to guarantee atomicy, you need a function:
```
this.setState(state => ({ number: state.number + 1 }));
```
This atomicy is particularly important if setState is called multiple times in a single frame of execution as the result of complex user actions. It's a tricky bug to chase down and difficult to determine how to fix when you find it. The current pattern of reaching into _pendingState relies on an implementation detail.
In this example: props.doAction() may result in your ancestor re-rendering and providing you with new props. If setState is called directly with an object literal referencing `this.props`, it will use the *old* version of props, not the new value. Using a function solves for this case:
```
this.props.doAction();
this.setState((state, props) => ({ number: state.number * props.multiplier }));
```
2015-02-03 19:49:17 -05:00
Paul O’Shannessy
3f60a99cd9
Merge pull request #3016 from hnordt/patch-1
...
Removing unnecessary returns
2015-02-03 10:46:21 -08:00
Jeff Morrison
acca4b3993
Merge pull request #3020 from syranide/jsxbracketcodemod
...
Added jsx_orphaned_brackets_transformer for breaking JSX parser change
2015-02-03 09:56:28 -08:00
Héliton Nordt
62213e08df
Fix highlighting
2015-02-03 08:38:16 -02:00
Sebastian Markbåge
c8833daf53
Merge pull request #3026 from sebmarkbage/fixdependency
...
Hot fix cyclic dependency
2015-02-02 23:57:46 -08:00
Sebastian Markbage
e3f95ea293
Hot fix cyclic dependency
...
We accidentally created an unfortunate cyclic dependency because of the
auto-wrapper hack that uses ReactClass.
Making it injected instead.
2015-02-02 23:55:34 -08:00
Sebastian Markbåge
50c38bbc75
Merge pull request #3023 from sebmarkbage/devtoolsfix
...
Expose ReactReconciler
2015-02-02 22:07:28 -08:00
Sebastian Markbåge
1172f636cb
Merge pull request #3025 from sebmarkbage/fixrendercallback
...
Always trigger an update when a callback is enqueued.
2015-02-02 22:07:13 -08:00
Brian Holt
7b92d71744
Changed itemId to itemID and added clarity to the comments of where it is specified.
2015-02-02 21:58:00 -08:00
Sebastian Markbage
2702281a13
Always trigger an update when a callback is enqueued.
...
enqueueCallbackInternal forgot to schedule an update.
We could rely on the implicit contract of enqueueElement to do it. However,
if we're currently outside a transaction, it'll flush synchronously. Before
we enqueue the callback. We could also enqueueCallback before we
enqueueElement, but that causes a fragile relationship between them. E.g.
enqueueElement should not need to schedule an update if it is the same
element.
2015-02-02 20:42:15 -08:00
Sebastian Markbage
e67ff7ee78
Expose ReactReconciler
...
This can be used by devtools to monkey patch the reconciler and therefore
get notified whenever any internal instance is updated.
2015-02-02 18:15:31 -08:00
Brian Holt
ea67a1d436
Added itemRef and itemId for complete microdata support.
2015-02-02 17:17:04 -08:00
Ben Moss
ba55716a2d
Fix warning messages wording and access of displayName
2015-02-02 18:05:31 -05:00
syranide
f3271ad53b
Added jsx_orphaned_brackets_transformer for breaking JSX parser change
2015-02-02 23:24:15 +01:00
Andreas Svensson
63c3461af7
Merge pull request #1864 from syranide/ie8text2
...
Newlines handled incorrectly by innerText in IE8
2015-02-02 21:33:48 +01:00
Andreas Svensson
c371709d23
Newlines handled incorrectly in innerText in IE8
2015-02-02 21:27:27 +01:00
Andreas Svensson
8d6c8a7793
Merge pull request #3017 from syranide/trydefine
...
Try/catch property deprecation warnings to support IE8
2015-02-02 21:26:18 +01:00
Jim
381a01a19b
Merge pull request #3018 from jsfb/assert-not-throw
...
Expecting transform not to throw. Removed meaningless comment.
2015-02-02 12:21:05 -08:00
Jim
b207b8698c
Expecting transform not to throw. Removed meaningless comment.
2015-02-02 12:19:47 -08:00
Andreas Svensson
387adae3de
Merge pull request #3000 from syranide/openbool
...
Set HTML DOM property "open" to HAS_BOOLEAN_VALUE
2015-02-02 21:11:10 +01:00
syranide
0a1cd56ead
Try/catch property deprecation warnings to support IE8
2015-02-02 21:00:04 +01:00
Paul O’Shannessy
6c36b528e2
Merge pull request #2997 from rickbeerendonk/2943-jsx-build-tool-documentation
...
Documents that JSX tool is transforming files with .js extension (and no...
2015-02-02 11:25:32 -08:00
Paul O’Shannessy
f922664e86
Merge pull request #3007 from JoelOtter/patch-2
...
Add note linking to up-to-date doc on Flux website
2015-02-02 11:22:45 -08:00
Sebastian Markbåge
534d23d903
Merge pull request #3012 from sebmarkbage/typescript
...
Use TypeScript Compiler API Directly
2015-02-02 11:21:40 -08:00
Héliton Nordt
8fc4f23cdb
Removing unnecessary returns
2015-02-02 17:20:38 -02:00
Paul O’Shannessy
bab94bf2af
Merge pull request #3011 from koba04/fix-coponent-api-doc
...
Fix consistency of component api document
2015-02-02 11:18:10 -08:00
Paul O’Shannessy
8b1cd7509d
Merge pull request #3001 from rgarcia/patch-1
...
remove extraneous comma in tutorial
2015-02-02 11:16:28 -08:00
Paul O’Shannessy
2aeb8a2a6b
Merge pull request #2995 from rickbeerendonk/copyright-2015
...
Update copyright headers for 2015
2015-02-02 11:15:30 -08:00
Paul O’Shannessy
e04bdd8c9b
Merge pull request #2999 from sedovsek/master
...
Changed unit to pixels due to inconsistent font-size rendering of code elements.
2015-02-02 11:05:35 -08:00
Petri Lehtinen
2e232f83bc
Document React.addons.TestUtils.isElement()
2015-02-02 10:22:52 +02:00
Sebastian Markbage
f6fd4a8506
Use TypeScript Compiler API Directly
...
In 1.4.0 we can use the TypeScript API directly to preprocess our files.
This lets us get rid of a dependency.
https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API
We can also use this to provide our default libraries so that we don't
need to keep the references in the test file.
2015-02-01 22:41:00 -08:00
Toru Kobayashi
b7860b7da4
Fix consistency of component api document
2015-02-02 09:52:08 +09:00
Joel Auterson
344d07d7de
Add note linking to up-to-date doc on Flux website
2015-02-01 15:26:29 +00:00
Rafael
246fdebf82
remove extraneous comma in tutorial
2015-01-31 12:31:14 -10:00
syranide
aa9edc2a9c
Set HTML DOM property "open" to HAS_BOOLEAN_VALUE
2015-01-31 23:11:08 +01:00
Robert Sedovsek
ea94ec8c0e
Changed unit to pixels due to inconsitent font-size rendering of code elements.
2015-01-31 22:53:21 +01:00
Rick Beerendonk
f1bd869350
Add Conferences section to the Community Resources on the website
2015-01-31 22:46:03 +01:00
Rick Beerendonk
2de44cf668
Documents that JSX tool is transforming files with .js extension (and not .jsx) by default
2015-01-31 20:59:18 +01:00
Rick Beerendonk
3e0750a4ad
Update copyright headers for 2015
2015-01-31 20:18:25 +01:00
Andreas Svensson
905bfcec60
Merge pull request #1912 from syranide/safereuse
...
Warn if mounting into node with dirty rendered markup
2015-01-31 19:56:34 +01:00
Andreas Svensson
c460ad660b
Warn if mounting into node with dirty rendered markup
2015-01-31 19:36:12 +01:00
Andreas Svensson
a170629128
Merge pull request #1568 from syranide/dompurge
...
Only purgeID on ReactDOMComponent and ReactDOMTextComponent unmount
2015-01-31 18:21:22 +01:00