Sebastian Markbage
9abd1133c9
Pass context to the constructor
...
This should reenable reading this.context from getInitialState.
Added a bunch of tests for this too.
2015-01-23 10:09:45 -08:00
Sebastian Markbage
766a79c695
Move component class instantiation into ReactCompositeComponent
...
We need to move instantiation into the mount phase for context purposes.
To do this I moved the shallow rendering stuff into ReactTestUtils and
reused more of the existing code for it by instantiating a noop child.
Everywhere we refer to the "type" we should pass it to ReactNativeComponent
to resolve any string value into the underlying composite.
2015-01-23 10:09:45 -08:00
Kirk Steven Hansen
3d37c95533
Typo in first commit.
2015-01-22 23:34:14 -06:00
Kirk Steven Hansen
b4007e85b8
Updated tutorial to be more clear about the dependence on the --harmony flag.
2015-01-22 23:30:02 -06:00
Sebastian Markbåge
8616a6f60e
Merge pull request #2919 from sebmarkbage/removecreateref
...
Remove React.createRef API
2015-01-22 19:13:55 -08:00
Sebastian Markbage
a3a464c8fc
Remove React.createRef API
...
This API was removed so this won't work.
2015-01-22 19:11:11 -08:00
Ben Alpert
f9821de909
Merge pull request #2917 from spicyj/ref-composite
...
Switch first-class refs to use functions
2015-01-22 18:19:05 -08:00
Ben Alpert
322bde6eb0
Switch first-class refs to use functions
...
Closes #1373 .
Test Plan: jest
2015-01-22 18:10:25 -08:00
Jim
734aedb977
Merge pull request #2892 from jsfb/fbme-url-for-dangerouslySetInnerHtml
...
Added fb.me url to error message.
2015-01-22 17:07:28 -08:00
Ben Alpert
a534264c1e
Merge pull request #2916 from spicyj/ref-composite
...
Move ref code to ReactCompositeComponent
2015-01-22 16:01:51 -08:00
Ben Alpert
9c3d6b8881
Move ref code to ReactCompositeComponent
...
You can only get a ref to a ReactCompositeComponent, so move the ref code here which gives us more flexibility to put it at the correct time in the lifecycle.
There should be no behavior change in this commit.
Test Plan: jest
2015-01-22 15:36:59 -08:00
Paul O’Shannessy
3d109aa11b
Merge pull request #2915 from zpao/lint-fixup
...
Fix a couple small lint issues
2015-01-22 14:56:25 -08:00
Paul O’Shannessy
c33d443c0b
Fix a couple small lint issues
...
These aren't caught by eslint yet :(
2015-01-22 14:39:08 -08:00
Sebastian Markbåge
8a5c5ba69d
Merge pull request #2913 from sebmarkbage/typewarning
...
Add warning when accessing .type on a component class
2015-01-22 13:39:07 -08:00
Sebastian Markbage
1ed1d7a158
Add warning when accessing .type on a component class
...
Since we removed the wrapper factory around classes, the class is just
the class now so there is no need for this indirection property.
2015-01-22 13:26:34 -08:00
Paul O’Shannessy
6588a84a0f
Merge pull request #2765 from zpao/jsxtransformerlinenumber
...
Check for lineNumber support before using it
2015-01-22 12:58:51 -08:00
Jim
b94adc9724
Added fb.me url to error message.
2015-01-22 12:56:52 -08:00
Paul O’Shannessy
f8a214137a
Merge pull request #2903 from tendant/merge-conflicts-in-translation
...
Update documents for Chinese translation
2015-01-22 12:55:53 -08:00
Paul O’Shannessy
92e361709c
[docs] Use current date in copyright footer
...
This will be based on the site generation time, making doc generation
slightly less deterministic but that's ok. Now we won't depend on
helpful community members updating it for us (#2874 ) when we forget,
it'll just happen naturally the next time the site is generated.
2015-01-22 12:50:52 -08:00
Jim
54b565de93
Merge pull request #2518 from jsfb/documentation-for-dangerouslySetInnerHtml
...
Document justification for dangerouslySetInnerHTML, fixes #2256
2015-01-22 10:52:47 -08:00
Ben Alpert
76e1d5a542
Merge pull request #2902 from swestwood/patch-2
...
Correctly highlight changed line in tutorial.
2015-01-22 08:27:29 -08:00
Lei
943c2aa77a
Add Chinese translation of reusable-components
2015-01-21 19:43:24 -08:00
Lei
833fcb6593
Add Chinese translation of multiple-components
2015-01-21 19:34:40 -08:00
Paul O’Shannessy
6247f30103
Merge pull request #2890 from amykyta/patch-1
...
Update 02.1-jsx-in-depth.md
2015-01-21 19:07:01 -08:00
Timothy Yung
b403af192d
Merge pull request #2900 from wincent/test-desc-fix
...
Fix inaccurate spec description
2015-01-21 18:56:33 -08:00
Paul O’Shannessy
4b2e89dd99
Add npm run build
...
It's a "shortcut" to `grunt build`
2015-01-21 17:23:36 -08:00
Sophia Westwood
a19966f2ea
Correctly highlight changed line in tutorial.
...
This excerpt adds the onSubmit handler to the form element, but the line was not highlighted as having been modified.
2015-01-21 17:15:31 -08:00
Greg Hurrell
76fe572a97
Fix inaccurate spec description
...
The string here was initially accurate, but got out of sync with reality
when the commit was revised (as 892e357fd5 ).
2015-01-21 17:07:29 -08:00
Timothy Yung
892e357fd5
Merge pull request #2894 from yungsters/local-event-trap-mixin
...
Fix LocalEventTrapMixin for Bad Tree State
2015-01-21 15:34:32 -08:00
yungsters
a7aca51f1e
Throw for Misue of LocalEventTrapMixin
...
Summary:
If `getDOMNode()` returns null in `LocalEventTrapMixin`, `listener` will also be null and `accumulateInto` will throw. This changes `LocalEventTrapMixin` to throw a more helpful error message.
Test Plan:
Ran unit test successfully:
```
npm test LocalEventTrapMixin-test.js
```
2015-01-21 15:30:04 -08:00
Jim
6f44f6049e
Document justification for dangerouslySetInnerHTML, fixes #2256
...
Conflicts:
docs/_data/nav_tips.yml
docs/tips/17-children-undefined.md
2015-01-21 12:47:36 -08:00
Isaac Salier-Hellendag
972befe0b6
Merge pull request #2889 from salier/react-default-perf
...
Repair ReactDefaultPerf
2015-01-21 13:28:53 -06:00
amykyta
b8f3c7f7fb
Update 02.1-jsx-in-depth.md
2015-01-21 12:22:29 -05:00
Isaac Salier-Hellendag
de54d84051
Repair ReactDefaultPerf
...
Update ReactDefaultPerf to properly record component names.
2015-01-21 10:52:43 -06:00
Cedric Sohrauer
5f837074f9
adds a composite component for an iframe to handle load events
...
This is basically a copy of ReactDOMImg
2015-01-21 10:33:34 +01:00
Paul O’Shannessy
ce5346f2ce
Merge pull request #2884 from chenglou/fix-ex-source-map
...
Temporarily comment out bundle-collapser for JSXTransformer
2015-01-20 18:55:39 -08:00
Paul O’Shannessy
f9c393f4fb
Fix strict mode violoation in test
2015-01-20 18:26:51 -08:00
Cheng Lou
51d74ca36c
Temporarily comment out bundle-collapser for JSXTransformer
...
This will at least make the examples run while we fix the issue.
2015-01-20 20:27:59 -05:00
Paul O’Shannessy
06de3f31f0
Merge pull request #2875 from kchia/patch-2
...
Update 03-interactivity-and-dynamic-uis.md: correct typo
2015-01-20 16:42:27 -08:00
Paul O’Shannessy
0a62a04909
Merge pull request #2881 from camsong/master
...
Add Chinese translation to several pages.
2015-01-20 16:41:58 -08:00
Sebastian Markbage
a5657d213c
Fix lint
2015-01-20 14:40:19 -08:00
Paul O’Shannessy
c778e61da0
Fix ES6Class test so it runs in browsers
...
document.createElement throws an error if you don't pass it any
arguments. Neither PhantomJS nor jest (via jsdom at version jest is
using) behave as browsers do now so this went unnoticed.
2015-01-20 14:30:33 -08:00
Sebastian Markbåge
2d75b11097
Merge pull request #2808 from sebmarkbage/modernclasses
...
New class instantiation and initialization process
2015-01-20 14:28:40 -08:00
Sebastian Markbage
291a92c4a6
New class instantiation and initialization process
...
This allows state to be set up in the constructor instead of through
getInitialState. getInitialState is now considered part of "classic".
Therefore, they move into ReactClass's constructor.
As a consequence of this, we no longer have a mapping between the internal
representation and the public instance during the mounting process.
Because the constructor hasn't returned yet.
We used to have a special case for calling setState in getInitialState
which was just ignored. This makes that throw and the component is
considered unmounted during the construction phase.
2015-01-20 14:27:28 -08:00
Jim
f92967c886
Merge pull request #2853 from jsfb/warn-only-on-read
...
Eliminate context warnings when component isn't reading the conflicting context variable
2015-01-20 11:57:30 -08:00
Cam Song
1694aff89e
Add Chinese translation to 7 more pages.
...
Translate 'Note' to '注意' instead of '提示' to make it more sensible.
2015-01-20 00:15:16 +08:00
Hou Chia
9f18ccdce9
Update 03-interactivity-and-dynamic-uis.md: correct typo
...
My file change corrects a typo in the document.
Best,
Hou
2015-01-18 00:35:27 -08:00
Paul O’Shannessy
c6686768eb
Merge pull request #2874 from Carlsson87/patch-1
...
Update footer with correct year
2015-01-17 12:21:21 -08:00
Daniel Carlsson
4ffdbefaa2
Friends don't let friends look foolish on the internet
...
Updated your footer =)
2015-01-17 20:16:24 +01:00
Paul O’Shannessy
f656f1966e
Merge pull request #2297 from pedronauck/docs-namespace-in-jsx
...
Add a section at 'jsx-in-depth' talking about namespaced components
2015-01-16 16:21:22 -08:00