Commit Graph

2017 Commits

Author SHA1 Message Date
plievone c5bf2ada4b [addons] Renamed update() directives to commands 2014-03-22 01:40:05 +02:00
Paul O’Shannessy f0eae5086b version bump for 0.11 development 2014-03-21 14:58:52 -07:00
Paul O’Shannessy aea3949062 0.10 release materials 2014-03-21 14:57:03 -07:00
Paul O’Shannessy 3b2d176f59 Update AUTHORS for 0.10 2014-03-21 13:21:20 -07:00
Pete Hunt 68da0eccbe Merge pull request #1282 from jeffbski/addCodewinds004Videos
add CodeWinds episode 4 w/Pete Hunt to videos
2014-03-21 12:54:48 +00:00
Jeff Barczewski 593889b87a add CodeWinds episode 4 w/Pete Hunt to videos
Added to videos.md
2014-03-21 07:41:06 -05:00
Paul O’Shannessy 732f4717a6 Merge pull request #1186 from chenglou/doc-toString-opt
[Docs] document optional param for renderComponentToString
2014-03-20 17:28:51 -07:00
Ben Newman 7807413256 Upgrade Commoner to v0.9.2 to silence deprecation warnings.
Closes #1278.
2014-03-20 14:43:47 -04:00
Ben Alpert ec893833ee Merge pull request #1273 from wincent/typo-fix-02
Fix a minor typo in the `update()` docs
2014-03-19 15:37:30 -07:00
Greg Hurrell 5aaf4dbae9 Fix a minor typo in the update() docs 2014-03-19 15:33:43 -07:00
Paul O’Shannessy ecea2918cf 0.10rc blog post 2014-03-18 22:15:16 -07:00
Paul O’Shannessy 7f24943e5a update version for 0.10rc v0.10.0-rc1 2014-03-18 22:09:32 -07:00
Paul O’Shannessy 0491d30e7c re-enable moved root warning 2014-03-18 22:03:25 -07:00
Paul O’Shannessy 55b0222596 Upgrade browserify 2014-03-18 21:33:39 -07:00
Paul O’Shannessy b95fbbe4a2 Silence tests unsupported in PhantomJS.
These tests can still be run in the browser using `grunt test --debug`.

This is a repeat of 42f8d155f8. For posterity, we
do this because Phantom has a problem with Object.freeze and the test runner
can't do __DEV__ right (because we get rid of that in the build step).
2014-03-18 17:48:16 -07:00
Kunal Mehta e505e47e01 Separate immutable project
This moves Immutable and Immutable object into the new `immutable` project.
2014-03-18 15:03:26 -07:00
Sebastian Markbage e0c487649d Logging use of objects as maps for children
Let's start logging objects as maps for children. We may want to deprecate this
and replace it with ImmutableMap and Map data structures instead.

This should ideally be logged in the recursive function but since that loses the
scope of where these children are passed it's easier to start tracking them
here to get an idea of how frequently and where it's used.
2014-03-18 15:01:51 -07:00
Andrew Zich 22057ef61c don't try to use Object.prototype methods as transfer strategies in ReactPropTransferer.mergeProps
While looking up a detail of how `transferPropsTo()` works I noticed that we never check `TransferStrategies.hasOwnProperty(thisKey)` when merging props, just `newProps.hasOwnProperty(thisKey)` and a truthy test for `TransferStrategies[thisKey]`. This means that if our `newProps` has keys like `toString`, `valueOf`, or `constructor` etc. set, we will pull these functions off `TransferStrategies` and invoke them when merging props. In most cases this will just result in a failure to merge and some code without side effects being run but in the case of `valueOf` it will actually generate an exception.
2014-03-18 15:01:46 -07:00
Josh Duck 0278f01d95 Replace function expression with for loop
isCustomAttribute used an anonymous function in place of a for loop.
Swap it out so we're not allocating unnecessarily.
2014-03-18 14:57:08 -07:00
Kunal Mehta 0cec4af8d7 Sync latest Immutable changes 2014-03-18 14:57:04 -07:00
Paul O’Shannessy 8d495f3b6e Revert "Merge pull request #1234 from RReverser/pure-cjs"
This reverts commit 7987e6a51d, reversing
changes made to d88d479685.
2014-03-18 11:25:21 -07:00
Ben Newman 7987e6a51d Merge pull request #1234 from RReverser/pure-cjs
Switched from browserify to pure-cjs bundler.
2014-03-18 12:04:58 -04:00
Paul O’Shannessy d88d479685 Merge pull request #1193 from spicyj/jsx-polygon
Add polygon tag to transform
2014-03-17 10:07:23 -07:00
Ingvar Stepanyan 3f3187c14f Renamed commojs task to bundle, added failing build if bundler failed. 2014-03-17 16:53:02 +02:00
Ben Alpert c1443e92e6 Merge pull request #1226 from LilyJ/master
included link to React devtools in tooling-integration. fixes #791
2014-03-16 22:42:14 -07:00
Paul O’Shannessy 52e8f3fdb0 Merge pull request #1248 from asolove/svg-text-anchor
Add svg text-anchor attribute
2014-03-16 22:33:00 -07:00
Paul O’Shannessy cdf4f07a15 Merge pull request #1229 from spicyj/no-jsx
Avoid JSX in ReactCSSTransitionGroup code
2014-03-16 22:31:24 -07:00
Paul O’Shannessy 6ff116e34b Merge pull request #1262 from vjeux/harmony-react-to
Add support for {harmony: true} to react-tools
2014-03-16 22:30:30 -07:00
Pete Hunt d889a01caf Fix ref behavior for remounting
I'm thinking that setting up `this.refs` in `mountComponent` is better than `construct`. Followed the same pattern as `ReactComponent.Mixin` and nulling out
the value in `construct` and setting it to its initial value in `mountComponent`.
2014-03-16 22:01:54 -07:00
Pete Hunt 04f9887f0e More actionable error message for <tbody> and nested <p>
This bites people all of the time. Until we have a better solution, let's just make the error message more actionable (most people don't know how the DOM
gets unexpectedly mutated).
2014-03-16 22:01:34 -07:00
Sebastian Markbage 9b427a322f Fix some invalid uses of instances
Breaking this out of the other code mod.
2014-03-16 22:01:30 -07:00
Sebastian Markbage 7bbdcdba96 Reassign variable of rendered component
The component that gets passed into renderComponent isn't guaranteed to be the
instance that gets mounted. We want to clone the instance.

Unit tests need to reason about the mounted instance. The first code mod changes:

  ReactTestUtils.renderIntoDocument(<identifier>)

into

  <identifier> = ReactTestUtils.renderIntoDocument(<identifier>)

Using this scripts:

  scripts/bin/codemod -m -d ~/www --extensions js \
   '^(\s*)ReactTestUtils\.renderIntoDocument\(\s*([$a-zA-Z0-9_]+)\s*\)' \
   '\1\2 = ReactTestUtils.renderIntoDocument(\2)'

In the second case I do the same for React.renderComponent. However, there are
alot more unnecessary matches so I only codemod if the same identifier occurs
later in the file.

  scripts/bin/codemod -m -d ~/www --extensions js \
   '^(\s*)React.renderComponent\(\s*([$a-zA-Z0-9_]+)\s*?,(.*?\n?.*?\s\2\b)' \
   '\1\2 = React.renderComponent(\2,\3'

And one more for ReactMount.renderComponent used by internals.

  scripts/bin/codemod -m -d ~/www --extensions js \
   '^(\s*)ReactMount.renderComponent\(\s*([$a-zA-Z0-9_]+)\s*?,(.*?\n?.*?\s\2\b)' \
   '\1\2 = ReactMount.renderComponent(\2,\3'

This still matches many unnecessary cases where the second occurance of the
identifier is a redeclaration or comment. But this code mod doesn't hurt in
those cases.

Finally I have to do the same for:

  this.<identifier> = React.renderComponent(this.<identifier>,

This is a common pattern for production code but not tests. Some of these call
sites will likely break when we move to true descriptors.

  scripts/bin/codemod -m -d ~/www --extensions js \
   '^(\s*)React.renderComponent\((\s*)this\.([$a-zA-Z0-9\_\.]+)\s*?,' \
   '\1this.\3 = React.renderComponent(\2this.\3,'
2014-03-16 22:01:09 -07:00
Christopher Chedeau 5106b793f7 Add support for {harmony: true} to react-tools
```
require('react-tools').transform(code, {harmony: true});
```

now enables all the harmony es6 transforms that are supported.

This is modeled after https://github.com/facebook/react/blob/master/bin/jsx#L17-L23
2014-03-16 15:38:40 -07:00
Jonas Gebhardt 83e4ef16e6 Community Round-up #18 2014-03-14 16:56:12 -07:00
Paul O’Shannessy 308c9a0752 Merge pull request #1181 from lrowe/patch-5
omitClose for all void elements
2014-03-12 16:37:52 -07:00
Adam Solove 6a01752f3d Add svg text-anchor attribute. 2014-03-12 10:07:05 -04:00
Ben Alpert 6fd53815cd Merge pull request #1246 from ericflo/patch-1
Remove Shirtstarter as an example application.
2014-03-11 15:48:20 -07:00
Eric Florenzano 3efa02da91 Remove Shirtstarter as an example application.
We have unexpectedly had to shut Shirtstarter down, so it won't serve as a good React.js example any more unfortunately -- sorry for the documentation churn.
2014-03-11 15:45:14 -07:00
Jeff Morrison d9af091244 Merge pull request #1242 from syranide/jsxcomfix
Unbreak JSX comment comma fix
2014-03-11 10:13:24 -07:00
Ingvar Stepanyan 25773ed1b3 CommonJS builder config to Grunt style for easier handling and readability. 2014-03-11 13:40:38 +00:00
Ingvar Stepanyan 9e224e615f Renamed browserify tasks/configs to cjs, updated pure-cjs to 1.9.0 for better build speed. 2014-03-11 13:26:36 +02:00
Cheng Lou 3ce2cd04e2 Merge pull request #1243 from jeffcarp/master
Remove unused variable in ballmer-peak
2014-03-10 21:29:35 -07:00
Jeff Carpenter 652f5aea28 Remove unused variable 2014-03-10 19:48:13 -07:00
Andreas Svensson 280ff2e5a7 Unbreak JSX comment comma fix 2014-03-11 00:31:59 +01:00
Pete Hunt 5ede7fb619 ReactDOMComponent optimization
Slight optimization to not do unneeded reconciles of DOM components
2014-03-10 15:32:20 -07:00
Sebastian Markbage 3ea3274ca4 Clone on mount
This is the first step towards descriptors. This will start cloning the
component when it's mounted instead of mounting the first instance.

This avoids an issue where a reference to the first instance can hang around
in props. Since a mounted component gets mutated, the descriptor changes.

We don't need to clone the props object itself. Mutating the shallow props
object of a child that's passed into you is already flawed. Those cases need to
use cloneWithProps. A props object is considered shallow frozen after it leaves
the render it was created in.
2014-03-10 15:28:54 -07:00
Paul O’Shannessy 2ca810fbf3 Merge pull request #1225 from spicyj/cprop
Fix removing DOM property with mapped name
2014-03-10 11:29:10 -07:00
Pete Hunt d9dd9d5cb3 Merge pull request #1235 from fxbois/master
Update 08-tooling-integration.md
2014-03-08 20:15:45 -08:00
fxbois 9ffd70c688 Update 08-tooling-integration.md
emacs compatibility
2014-03-08 18:12:05 +01:00
Ingvar Stepanyan 3171436d97 Switched from browserify to pure-cjs bundler.
Optimizations and fix for JSXTransformer build.
Dropped dependency on emulation of Node.js native modules.
Added deamdify step for JSXTransformer build.
2014-03-08 16:33:58 +02:00