Commit Graph
2573 Commits
Author SHA1 Message Date
Glen Mailer 83fd5583bf Note how to access Perf in docs 2014-07-19 16:14:27 +01:00
Sebastian Markbage c419cce5c9 Move defaultProps resolution to the descriptor factory
Moves the defaultProps resolution to the descriptor factory.
2014-07-18 22:01:36 -07:00
Sebastian Markbage 3a7dbe6b73 Deprecate transferPropsTo 2014-07-18 22:01:36 -07:00
Paul O'Shannessy de711efcc9 When proxying statics functions, copy properties
Port of 076047012a which went in
externally before ReactLegacyDescriptor happened, so it needed to be
ported.
2014-07-18 22:01:36 -07:00
Ben Newman 23c5332208 Fix ReactTestUtils.mockComponent so that mockTagName is not ignored.
The `mockTagName` parameter was always optional, and so probably was not
used very often. If you tried to use it, it would be shadowed by the
`var mockTagName` declaration in the `render` method, so only
`module.mockTagName` or `"div"` were ever possible values.
2014-07-18 22:01:36 -07:00
Ben Newman 2347abf75c Don't call window.getSelection when it isn't defined.
Sadly, jsdom does not support `window.getSelection` yet, but
`ExecutionEnvironment.canUseDOM` is `true` in a jsdom environment.
2014-07-18 22:01:36 -07:00
Sebastian Markbage 3818656f70 Use Object.assign in merge/mergeInto
Relax the argument type checks. Currently we throw for non-objects and terminals
but Object.assign does a coercion to Object instead. It also allows merging
Arrays as if they are objects.

This also relaxes the check for dependents such as ImmutableObject. This sucks
but it will allow us to use a fast code path to native Object.assign.

We always have the option of adding warnings to Object.assign or static type
checks.

I'm keeping the null check. Object.assign throws for null checks.

We'll also start returning the result of coercions just like Object.assign.
2014-07-18 22:01:36 -07:00
Sebastian Markbage 225d76f772 Drop transferPropsTo usage in React core
These were completely unnecessary uses of transferPropsTo.
2014-07-18 22:01:36 -07:00
Ben Newman 66cdba3dfb Avoid leading spaces when first argument to joinClasses is falsy.
This detail is going to become more important once the idiom
`className={joinClasses(this.props.className, newClass)}` becomes more
common, as it will when we move away from `this.transferPropsTo`.
2014-07-18 22:01:36 -07:00
Sebastian Markbage 5aab0bddaa Move key/ref off props and prepare for new descriptor factories
Breaking changes

- key/ref are no longer accessible on props but they are accessible on the
  descriptors. This means that parents/owners can access it but not the
  component itself.

- Descriptor factories are now plain functions and you can't rely on the
  prototype or constructors of descriptors to identify the component type.

Existing descriptor factories are now wrapped in a legacy factory. Currently it
does nothing but it will give us a hook to track callers to factories that are
not using JSX but just invoking the function directly. It also proxies static
methods/properties to the underlying class. The newer factories don't have this
feature.

ReactTextComponent has it's own little factory because it's props is not an
object. This is a detail and will go away once ReactTextComponent no longer
needs descriptors.
2014-07-18 22:01:36 -07:00
Paul O’Shannessy 06e6313a72 Merge pull request #1876 from petehunt/fix-jsxt2
Fix JSXTransformer
2014-07-18 20:07:49 -07:00
petehunt e8efa2a1e9 Fix browser-tranforms 2014-07-18 19:02:31 -07:00
Paul O’Shannessy 9929f6de1e Merge pull request #1870 from spicyj/gh-1866
Don't initialize reconcile transaction on server
2014-07-18 16:40:03 -07:00
Paul O’Shannessy 8439deadd0 Merge pull request #1869 from syranide/modistatecase
getModifierState is case sensitive
2014-07-18 16:13:34 -07:00
Ben Alpert 54d91c293d Don't initialize reconcile transaction on server
...when calling setState from within a componentWillMount. Fixes #1866.

Test Plan: jest
2014-07-18 11:03:34 -07:00
Paul O’Shannessy f367785a78 Merge pull request #1837 from garrensmith/update-todo-example
Update Todo MVC example
2014-07-18 10:56:21 -07:00
Andreas Svensson 495d866a66 getModifierState is case sensitive 2014-07-18 18:24:11 +02:00
Garren Smith 0c4be5a8f9 Update Todo MVC example
A small patch for the Todo MVC example to use React 0.11.0.
This then allows the `MainSection` to return `null` instead of
previous `<noscript/>`.
2014-07-18 10:51:43 +02:00
James Seppi 6d1ede34df fix typo
Closes #1859.
2014-07-17 15:58:33 -07:00
Ben Alpert 9698b54dfe Merge pull request #1860 from KyleAMathews/patch-3
Not a candidate anymore
2014-07-17 15:22:04 -07:00
Ben Alpert 384e8fe195 Fix appearance of video thumbnail 2014-07-17 15:19:58 -07:00
Kyle Mathews bd5e8aa076 Update 2014-07-17-react-v0.11.md 2014-07-17 15:18:41 -07:00
Ben Alpert d39b8078a3 Merge pull request #1835 from amm385/patch-1
Update videos.md
2014-07-17 15:15:11 -07:00
Paul O’Shannessy 5bfee601ce Bump version for 0.12.0-alpha
[skip ci]
2014-07-17 14:22:50 -07:00
Paul O’Shannessy 8814ee2065 Release materials for 0.11 2014-07-17 14:18:28 -07:00
Ben Alpert 11e0e5ae44 Performance boost in some cases 2014-07-17 13:43:43 -07:00
Paul O’Shannessy 5f77e6dc51 Upgrade commoner dependency
0.9.5 depended on Node 0.11+, so make sure we don't ever get that.
See https://github.com/reactjs/commoner/pull/65
2014-07-17 12:59:53 -07:00
Ben Alpert 6ee9aa773d Remove stale deprecation note from unmounting docs 2014-07-16 23:22:54 -07:00
Ben Alpert ba5c7ff507 Add React.Children.count docs 2014-07-16 23:19:45 -07:00
Paul O’Shannessy 0fdd98f0d4 Update authors/acknowledgements [skip ci] 2014-07-16 15:14:49 -07:00
Paul O’Shannessy c21678f9bc Merge pull request #1818 from chenglou/docs-apply
[Docs] Update addons.update
2014-07-16 14:17:47 -07:00
Paul O’Shannessy bb6087848d Merge pull request #1821 from chenglou/docs-addons-perf
[Docs] Perf tools
2014-07-16 14:17:30 -07:00
Paul O’Shannessy 62a4ac0f4d Merge pull request #1840 from spicyj/statics-proptypes
When proxying statics functions, copy properties
2014-07-16 13:07:56 -07:00
Ben Alpert 121529bdfd Add "Edit on GitHub" link on docs pages
Ember's docs do this and I rather like the idea of encouraging people to make improvements.
2014-07-16 11:17:00 -07:00
Ben Alpert dd3167edc9 Reorder reference pages
This order should make more sense; it moves important functions like React.renderComponent up and deprecated/discouraged ones like transferPropsTo and setProps down. No content changes.
2014-07-15 23:03:37 -07:00
Ben Alpert abb95eed5c Fix comma splice 2014-07-15 22:34:33 -07:00
Paul O’Shannessy 5ea3ff64b6 Merge pull request #1842 from spicyj/jstransform-visitors
Add new jstransform visitors to JSX transform
2014-07-15 16:36:14 -07:00
Ben Alpert f02264cf83 Add destructuring visitor to JSX harmony transform 2014-07-15 16:34:00 -07:00
Ben Alpert 076047012a When proxying statics functions, copy properties
Test Plan: jest
2014-07-15 15:09:16 -07:00
Cheng Lou 12750ad749 [Docs] Perf tools
Fixes #1814.
@petehunt @joshduck
The images look blurry (taken on retina then shrank down to 50%...)
2014-07-15 11:17:21 -07:00
Paul O’Shannessy e85e5e9952 Merge pull request #1817 from chenglou/docs-PureRenderMixin
[Docs] Document PureRenderMixin addon
2014-07-15 11:09:16 -07:00
Ben Alpert 76496b3cca Add note about higher/lower-level transition APIs 2014-07-14 21:41:07 -07:00
Cheng Lou 8ebadf1591 [Docs] Update addons.update
Fixes #1815.
Add the new `$apply` command, plus a few examples.

@petehunt
2014-07-14 17:59:22 -07:00
Areeb Malik 28ed79c2ce Update videos.md
reordering to spot #4
2014-07-14 17:31:56 -07:00
Areeb Malik afe30ad8ee Update videos.md
Adding video for my recent talk in London about using React in large scale applications
2014-07-14 17:16:44 -07:00
Ben Alpert 7b872cd781 Merge pull request #1813 from baddox/patch-2
Verb agreement grammar fix
2014-07-14 17:08:43 -07:00
Ben Alpert c26c2d42ac Merge pull request #1812 from baddox/patch-1
Add possessive to fix grammar
2014-07-14 17:07:10 -07:00
Mouad Debbar 97dbada03d Up-to-date React.Children
Make sure we actually include `.count`
2014-07-14 15:01:44 -07:00
Ben Alpert 65b2232f34 Fix typo-ed "of" 2014-07-13 13:09:50 -07:00
Ben Alpert 4a66260b2c Make code in headers not giant 2014-07-13 13:03:12 -07:00