Ben Alpert
ed257cb691
Merge pull request #3412 from spicyj/gh-3329
...
Squash getDOMNode warning from isDOMComponent
2015-03-13 17:55:02 -07:00
Ben Alpert
70985ba68d
Squash getDOMNode warning from isDOMComponent
...
Fixes #3329 .
2015-03-13 17:11:02 -07:00
Robert Knight
ee86942d77
Fix incorrect update of style when props.style transitions from null to non-null
...
ReactDOMComponent maintains a copy of the previous style
object to support in-place mutations of props.style.
This cached object was not cleared when the style
property was removed in a props update.
Fixes #3409
2015-03-13 22:16:19 +00:00
Sebastian Markbåge
ca8d7cba1b
Merge pull request #3355 from cpojer/shallowCompare
...
Add shallowCompare module and use it in PureRenderMixin + tests
2015-03-12 17:45:22 -07:00
Ben Alpert
f8672c7270
Fix grammar in warning message
2015-03-11 15:47:04 -07:00
Ben Alpert
d9e06462a3
Merge pull request #3383 from ariabuckles/proptype-warnings
...
[PropTypes] Add warnings if PropTypes return functions
2015-03-11 15:46:17 -07:00
Aria Buckles
206e69c403
[PropTypes] Make invalid proptype warning clearer
...
Addresses comments on #3383 , making the invalid proptype specification
warning clearer and making the tests for it a bit clearer.
2015-03-11 15:36:51 -07:00
Aria Buckles
d973e32336
[PropTypes] Add warnings if PropTypes return functions
...
Summary:
Right now, if a component specifies a propType as, for example,
`myProp: React.PropTypes.shape`, without an actual shape
parameter, any prop type will be accepted, because
`React.PropTypes.shape` returns a function (the actual validator),
not an Error, currently indicating that propType checking passed.
This can create an unfortunate situation where a component looks
like it has fully specified `propTypes`, but in fact does not.
This commit addresses this by warning if a propType checker returns
anything non-falsy that is not an Error (currently all the library
PropTypes return null or an Error).
Test Plan:
Added a unit test; ran `jest` in the root repo directory.
Also ran `grunt lint` and `grunt test`
2015-03-11 15:09:18 -07:00
Jim
3d8b47bbcc
Merge pull request #3356 from cpojer/findDOMNode
...
foo.getDOMNode => React.findDOMNode(foo)
2015-03-11 08:47:56 -07:00
Varun Rau
6cd004f20a
Fixed shallowEqual implementation to handle the case when inputs are not objects.
...
If either argument is not an object and unequal, then shallowEqual should return false.
If only one argument is an object, then shallowEqual should return false.
Fixes #3369
2015-03-10 18:03:51 -07:00
cpojer
413e96d0cd
Add some important getDOMNode tests back.
2015-03-10 17:27:19 -07:00
cpojer
ae7da3aadd
foo.getDOMNode => React.findDOMNode(foo)
2015-03-10 17:17:21 -07:00
Jim
91b45641b8
Merge pull request #3317 from ianobermiller/fix-shallow-equal
...
shallowEqual: bail if either argument is falsey
2015-03-10 15:45:03 -07:00
Ben Alpert
53f92bf858
Fix comma splice and line length
2015-03-10 15:36:27 -07:00
Jim
645a6caaf5
Merge pull request #3323 from jonhester/ie8-compat-mode
...
warn if IE8 is in compatibility mode
2015-03-10 15:35:09 -07:00
Ben Alpert
462e8f1be8
Merge pull request #3327 from Simek/initialize-variables-fix
...
initialize dev variables in dev mode only in shouldUpdateReactComponent.js
2015-03-10 15:33:29 -07:00
Ben Alpert
cff3f35bf7
Merge pull request #3321 from Smert/master
...
Bringing the code to one style.
2015-03-10 15:32:43 -07:00
Ben Alpert
4d9561d938
Merge pull request #3310 from darcyadams/console-exists-before-warn
...
Check that console exists before warning
2015-03-10 15:32:32 -07:00
Ben Alpert
b95fe57743
Merge pull request #3253 from jsfb/fix-comment-to-reflect-class-type-usage
...
Fix comment to reflect the new (non-deprecated) way of accessing a class type.
2015-03-10 15:31:50 -07:00
Ben Alpert
e8af59cf82
Merge pull request #3246 from spicyj/onclick
...
Revert "Revert #1536 "
2015-03-10 15:31:38 -07:00
Ben Alpert
68ca057bc3
Merge pull request #3230 from nmn/master
...
Add numeric CSS property - stroke width
2015-03-10 15:31:30 -07:00
Ben Anderson
75a8bc96b1
Warn when rendering directly into document.body
...
This is in response to #3207 to address concerns regarding third-party
scripts and browser plugins potentially altering DOM nodes within
document.body, causing problems with reconciliation.
Closes #3211 .
2015-03-10 15:31:02 -07:00
Ben Alpert
f77de57e41
Merge pull request #2946 from benmoss/nested-render-warning
...
Add displayName to nested render warnings [#1726 ]
2015-03-10 15:24:59 -07:00
Ben Alpert
4feed4fcc5
Merge pull request #2868 from chicoxyzzy/dev_and_prod_environments_consistancy
...
make dev and production environment consistent
2015-03-10 15:24:33 -07:00
Ben Alpert
9cb25b3ddb
Merge pull request #2266 from syranide/voidelem
...
ReactDOMComponent should not accept children for void elements
2015-03-10 15:24:00 -07:00
Paul O’Shannessy
e313616be7
Bump version so we can get back to work
2015-03-10 15:06:35 -07:00
Paul O’Shannessy
9d58e9a27b
Deprecate replaceProps
...
This isn't supported on plain JS classes anyway, so this is just adding
a warning in DEV before the code throws.
2015-03-10 10:44:47 -07:00
cpojer
a1631bea71
Add shallowCompare module and use it in PureRenderMixin + tests
2015-03-09 18:49:37 -07:00
Toru Kobayashi
29506cec54
Fix Perf displayName with ES6 classes
2015-03-10 09:45:40 +09:00
Paul O’Shannessy
62ee384d7b
Merge pull request #3330 from spicyj/no-render
...
Add warning when using non-component element types
2015-03-09 13:47:39 -07:00
Paul O’Shannessy
769e1cea03
Merge pull request #3337 from facebook/cpojer-patch-2
...
"Better" duck typing in reactComponentExpect
2015-03-09 13:45:50 -07:00
Paul O’Shannessy
8a3dd040a0
Merge pull request #3331 from zpao/null-frag-proptypes
...
Allow null and undefined values in non-frag object passed to PropTypes.node
2015-03-09 13:43:26 -07:00
Christoph Pojer
8ce9e2b194
Update reactComponentExpect.js
2015-03-06 02:46:33 -08:00
Christoph Pojer
419038f846
Fix documentation typo in ReactComponent
2015-03-06 01:33:56 -08:00
Paul O’Shannessy
0e797dffe4
Allow null and undefined values in non-frag object passed to PropTypes.node
2015-03-05 17:56:50 -08:00
Ben Alpert
6b7e4dc8e8
Add warning when using non-component element types
...
This should make debugging easier for people who missed callsites when fixing up their JSX/non-JSX usage.
2015-03-05 15:24:31 -08:00
Bartosz Kaszubowski
a42dcf4f7b
initialize dev variables in dev mode only
2015-03-05 21:20:48 +01:00
Jon Hester
65c4aeaa3a
use warning module instead of console.debug
2015-03-05 18:53:12 +00:00
Darcy
6b593083ed
check that console exists before warning
...
Console is undefined in earlier versions of IE when it is not open. This causes an uncaught exception, and breaks applications in these versions of IE when attempting to warn when the console is closed.
Admittedly, console will usually be open when testing in development, but still React should not break the application when it is not.
2015-03-05 09:20:16 -05:00
Jon Hester
a999ac1ac3
warn if IE8 is in compatibility mode
2015-03-05 13:48:28 +00:00
dmitry
adb9b20f6d
Bringing the code to one style.
2015-03-05 14:04:47 +02:00
Ian Obermiller
34f4a0e42d
shallowEqual: bail if either argument is falsey
...
Also add some unit tests.
2015-03-04 22:16:51 -08:00
Paul O’Shannessy
21b41480a5
v0.13.0-rc2
2015-03-03 11:46:01 -08:00
Sebastian Markbage
a27c6d1690
Always use a static message formats
...
These are the only places that seems to be including environment specific
variables in the message format.
By ensuring that they're static, we make it easier to group logs by
format. I also ensure that I keep each addendum separate so that they can
be filtered/grouped separately.
2015-03-02 13:18:38 -08:00
Paul O’Shannessy
4bad1aacb6
Merge pull request #3275 from spicyj/gh-3222
...
Don't use undefined as parent name in key warning
2015-03-02 12:47:52 -08:00
Paul O’Shannessy
8fdf4bbffc
Merge pull request #3276 from spicyj/gh-2978
...
Add regression test for scry order
2015-03-02 12:46:55 -08:00
Sebastian Markbåge
ecc4ad569a
Merge pull request #3266 from sebmarkbage/cloneelement
...
Add cloneElement Implementation
2015-03-02 12:15:20 -08:00
Sebastian Markbåge
edddd57d28
Merge pull request #3293 from spicyj/gh-3286
...
ReactFragment counts as a node without warning
2015-03-02 12:10:50 -08:00
Ben Alpert
7ebf7c46f5
ReactFragment counts as a node without warning
...
Fixes #3286 .
2015-03-01 11:50:07 -08:00
Antti Ahti
323789540a
Remove unnecessary variable from test
2015-02-28 15:23:34 +02:00