Sebastian Markbage
061c6fc13c
Avoid passing this of a static object
...
Refactoring artifact.
2015-02-25 18:37:02 -08:00
Paul O’Shannessy
95206fe5dc
Make cloneWithProps typechecks static-only
2015-02-22 14:40:39 -08:00
Paul O’Shannessy
06126ad3f4
v0.13.0-rc1
2015-02-22 13:26:13 -08:00
Paul O’Shannessy
a3ee6a9548
Merge pull request #2993 from chenglou/classset-ded
...
Put deprecation warning for classSet
2015-02-19 18:36:36 -08:00
Toru Kobayashi
60e96edce2
Fix a doc. cloneWithProps clones a ReactElement.
2015-02-20 10:08:46 +09:00
Jim
bad85fafa1
Fixed mistake in jsdocs types for cloneWithProps
2015-02-19 16:38:25 -08:00
Cheng Lou
835316bc13
Put deprecation warning for classSet
...
Also removes the one test that used the module.
2015-02-19 19:31:54 -05:00
Paul O’Shannessy
0f85884fa4
Merge pull request #3201 from zpao/non-factory-invariant
...
Warn when using constructor function directly
2015-02-19 15:53:50 -08:00
Sebastian Markbage
5a2c80382c
More warnings to ReactFragment.create
...
Apparently I could've used these too because if you accept an arbitrary
node, then these could end up being objects, but those objects might
also be arrays or elements.
2015-02-19 15:11:49 -08:00
Paul O’Shannessy
ad31cfa4dc
Warn when using constructor function directly
...
We no longer support the legacy factory style of calling component constructors
directly. We only support createElement or the wrapping of classes with
createFactory. Instead of letting this fail in a gross way as we try to run,
add a nice warning that shows up before the gross TypeError.
2015-02-19 13:57:48 -08:00
Henry Zhu
eba5d1365c
lint: remove spaces from array brackets
2015-02-19 00:13:36 -05:00
Henry Zhu
07cfd66028
lint: remove spaces from object braces
2015-02-19 00:10:31 -05:00
Timothy Yung
b0789c9582
Merge pull request #3187 from yungsters/shallow
...
Support unmounting in ReactShallowRenderer
2015-02-18 17:47:12 -08:00
yungsters
e9e33b984f
Support unmounting in ReactShallowRenderer
...
Reviewers: @sebmarkbage, @zpao
Test Plan:
```
$ npm test ReactTestUtils
```
2015-02-18 17:45:42 -08:00
Paul O’Shannessy
6c29eba035
Merge pull request #2821 from zpao/unitless-css-boxflex
...
Add boxFlex and boxFlexGroup to CSS Unitless Properties
2015-02-18 17:22:56 -08:00
yungsters
e952869ff8
Support rendering to null in ShallowComponentRenderer
...
Reviewers: @sema, @zpao
Test Plan:
```
$ npm jest
```
2015-02-18 11:31:02 -08:00
Sebastian Markbage
377319b863
Forgotten string
...
We forgot this `%s` as this was converted.
2015-02-17 18:26:12 -08:00
Sebastian Markbage
67cf95c16d
Avoid reading the property if hasOwnProperty is false
...
Easy with an Object.assign polyfill
2015-02-17 15:59:01 -08:00
Sebastian Markbåge
de3ecabd6c
Merge pull request #3148 from hmarr/fix-nan-mutation-warning
...
Prevent NaN props from triggering warnings
2015-02-17 15:41:18 -08:00
Sebastian Markbåge
cf4bef8bd7
Merge pull request #3171 from sebmarkbage/moarwarnings
...
Moar Warnings
2015-02-17 15:09:33 -08:00
Sebastian Markbage
2490289c4a
Warn if getDOMNode or isMounted is accessed in render
...
This is an anti-pattern that can be easily avoided by putting the logic
in componentDidMount and componentDidUpdate instead.
It creates a dependency on stale data inside render without enforcing
a two-pass render.
2015-02-17 11:49:20 -08:00
Sebastian Markbage
91194126d8
Warn if using Maps as children
...
We're not sure if this is the way we want to support this API. It creates
two ways of doing things.
It is convenient to avoid needing to explicitly redefine the key of Maps.
However, this use case isn't as common as having an iterable where the
key is on the value, not the key.
2015-02-17 11:23:12 -08:00
Sebastian Markbage
3587460675
Warn if accessing .type on a factory
...
This was an important convenience as an upgrade path but shouldn't be
necessary if you're using best-practice of calling createFactory in the
consuming component.
2015-02-17 11:06:54 -08:00
Paul O’Shannessy
68a8e4491f
Merge pull request #3147 from hzoo/lint-fixes
...
lint whitespace , trailing comma
2015-02-17 10:58:42 -08:00
Paul O’Shannessy
6cd7ab5254
Merge pull request #3154 from iamdustan/patch-1
...
s/upate/update
2015-02-17 10:55:42 -08:00
Vincent Siao
96e4e3cbbc
Fix ReactMount._renderNewRootComponent signature (ReactComponent -> ReactElement)
2015-02-15 19:25:18 -08:00
Dustan Kasten
dc21dca50e
s/upate/update
2015-02-14 22:09:31 -05:00
Henry Zhu
cb49492f88
lint whitespace
...
- use spaces
- remove space before paren in function
- remove space before colon in object
2015-02-14 11:12:18 -05:00
Harry Marr
198aabaafb
Prevent NaN props from triggering warnings
...
Previously, `checkAndWarnForMutatedProps` would flag `NaN` props as
having been mutated, because `NaN !== NaN`. This prevents that warning
from being emitted by explicitly checking for `NaN`s.
2015-02-14 10:06:55 +00:00
Henry Zhu
74726f0af5
remove space before round brace in function expressions
2015-02-13 23:41:53 -05:00
Henry Zhu
e2a57920da
lint whitespace , trailing comma
2015-02-13 23:13:47 -05:00
Paul O’Shannessy
5126cee0f5
v0.13.0-beta.2
2015-02-13 18:28:03 -08:00
Jim
207b03c56d
Dedupe owner-is-important warning.
2015-02-13 18:05:18 -08:00
Paul O’Shannessy
3751f85260
Merge pull request #3139 from brianpchsu/master
...
Fixed Copyright year for three files and react.js licence to BSD-license
2015-02-13 15:44:03 -08:00
Jim
5512d0d4d0
Merge pull request #3132 from jsfb/warn-less-for-owner-necessary
...
Only monitor components that are likely stateful (inputs and composites)
2015-02-13 13:55:06 -08:00
Brian Hsu
7e609c6903
Fixed Copyright year for three files and react.js licence to BSD-license.
2015-02-13 12:15:49 -08:00
Jim
f18dfdc00d
Only monitor components that are likely stateful (inputs and composites)
2015-02-12 17:22:42 -08:00
chico
e02a303e3e
.eslint in src is not necessary anymore
2015-02-13 02:44:32 +03:00
Paul O’Shannessy
7e5eb4b2b2
Add indent lint rule, fix code
2015-02-12 14:31:55 -08:00
Paul O’Shannessy
52b32d83d0
Remove newline at beginning of file
2015-02-12 14:28:54 -08:00
Paul O’Shannessy
12808e81c1
Fix license header to use BSD
2015-02-12 14:28:32 -08:00
Paul O’Shannessy
af8ad59a5b
Add space-before-blocks rules, fix code
2015-02-12 14:28:01 -08:00
Sebastian Markbage
f5038829d8
Moar warnings with solid prefixes!
...
This ensures that we have a prefix that can be easily identified in logs
so that we can filter out warnings based on their prefix.
This also turns the remaining two monitorCodeUse callers into warnings.
We'll probably still use monitorCodeUse until we know if we want to
deprecate but most releases should only have warnings.
2015-02-12 13:37:19 -08:00
Sebastian Markbåge
032fb6ce11
Merge pull request #3107 from sebmarkbage/fragments
...
Warn if a non-object value is used in ReactFragment.create
2015-02-11 11:58:46 -08:00
Paul O’Shannessy
c07657fde1
Merge pull request #3114 from chicoxyzzy/master
...
rename `Id` suffix to `ID` to apply naming conventions
2015-02-11 11:35:17 -08:00
chico
fbe88c7e46
fix Microdata properties' commentaries
2015-02-11 15:50:59 +03:00
Jim
4e5543965d
Flip console.warn to use warning module so users can intercept all warnings by shimming the warning module.
...
The two remaining console.warns are:
/Users/jsproch/react/src/test/mock-modules.js:
19 return mocks.generateFromMetadata(mocks.getMetadata(exports));
20 } catch (err) {
21: console.warn(err);
22 return exports;
23 }
/Users/jsproch/react/src/vendor/core/warning.js:
39 var argIndex = 0;
40 var message = 'Warning: ' + format.replace(/%s/g, () => args[argIndex++]);
41: console.warn(message);
42 try {
43 // --- Welcome to debugging React ---
2015-02-10 15:23:24 -08:00
chico
58d705110e
rename Id suffix to ID to apply naming conventions
2015-02-10 21:40:30 +03:00
Paul O’Shannessy
f6f0bab237
Merge pull request #3103 from zpao/lifecyle-warn-not-throw
...
Warn when calling setState & other methods at wrong time
2015-02-10 09:58:34 -08:00
Sebastian Markbage
093ab00085
Warn if a non-object value is used in ReactFragment.create
...
I made this mistake while upgrading a few callers.
I'm leaving this as warning so that it is always safe to wrap any existing
child in React.addons.createFragment without breaking prod.
This makes upgrading easier.
2015-02-10 09:44:14 -08:00