Commit Graph

3237 Commits

Author SHA1 Message Date
Paul O’Shannessy fcd4be3933 Update version references in the readme 2014-10-28 11:06:32 -07:00
Paul O’Shannessy 0b8454724e Update Authors & Acknowledgements for 0.12 2014-10-28 11:06:32 -07:00
Christopher Chedeau 081115609c React.js Conf blog post
Closes #2412
2014-10-28 11:06:31 -07:00
Cheng Lou 539db8e9c8 Merge pull request #2414 from benleiken/patch-1
Moved key requirement note into 'getting started'
2014-10-28 11:06:31 -07:00
Paul O’Shannessy 4d47ff36b2 Merge pull request #2413 from LeonFedotov/patch-1
Changing api documentation for jsx transformer
2014-10-28 11:06:31 -07:00
Sebastian Markbage 98bf80254f Update Docs Navigation 2014-10-28 11:06:31 -07:00
Sebastian Markbage 1cb3f25e78 More Descriptor -> Element renames 2014-10-28 11:06:31 -07:00
Sebastian Markbage b7a548c4bf Replace transferPropsTo with transferring props patterns 2014-10-28 11:06:30 -07:00
Sebastian Markbage 9b1ee4de46 Updated Docs for new JSX Changes
Moved non-JSX explanation to Displaying Data.
Overhauled JSX in Depth.
Added JSX Spread Section.
2014-10-28 11:06:30 -07:00
Paul O’Shannessy 0dd942b121 Update Animation docs for createElement 2014-10-28 11:06:30 -07:00
Paul O’Shannessy eb2827ec6a Update React.DOM -> React.createElement through docs 2014-10-28 11:06:30 -07:00
Paul O’Shannessy 0344aaf18d Use --harmomy in docs examples for cleaner code 2014-10-28 11:06:30 -07:00
Zacharias c260c45db3 Update jstransform version to ^7.0.0 2014-10-28 13:48:48 +01:00
Tienchai Wirojsaksaree ff12423d63 Fixing touch/mouse issues with TapEventPlugin
On ios device, browser simulates mouse events, but does that with
a delay, because of double tap gesture. The problem is that
TapEventPlugins listens to both types of events, so it fires twice

Everytime there is a touch event, we should ignore mouse events that
follow it.  This way, we still respond to both mouse and touch events,
just ignore the device generated ones.
2014-10-27 17:02:03 -07:00
Paul O’Shannessy 1c241b3ebc Ensure PropTypes test works when warning module is replaced
For example, warning might be replaced with a module that throws errors,
as is the case internally when running tests. Previously we were
whitelisting this test to provide time to update callsites. Now we
aren't and it fails.
2014-10-27 16:58:54 -07:00
Paul O’Shannessy 85930e63db Merge pull request #2413 from LeonFedotov/patch-1
Changing api documentation for jsx transformer
2014-10-27 16:32:07 -07:00
Cheng Lou 18066a301e Merge pull request #2414 from benleiken/patch-1
Moved key requirement note into 'getting started'
2014-10-27 18:47:24 -04:00
Benjamin Leiken bb0c7b4ca9 Moved key requirement note into 'getting started'
It's an important note and it was buried too far down the page. Now it's more prominent and harder for people to miss (like I did).
2014-10-27 10:22:57 -07:00
Leon Fedotov a29d496443 Changing api documentation for jsx transformer
Hi in chrome debugger, the files that use sourcemaps from the transformer get "null" as the filename during debug, https://github.com/facebook/react/blob/master/main.js#L15 "sourceFilename" is used instead of "filename" to specify the filename in the sourcemap.
2014-10-27 19:18:22 +02:00
Christopher Chedeau 64a5355444 React.js Conf blog post
Closes #2412
2014-10-27 10:12:09 -07:00
Paul O’Shannessy d63aa0f113 Move Object.assign file to align with internal 2014-10-26 17:14:00 -07:00
Paul O’Shannessy 076a8285f7 Merge pull request #2409 from enaqx/master
Remove obsolete jshint options
2014-10-26 11:12:20 -07:00
Nick Raienko eb3337b018 Remove obsolete jshint options 2014-10-26 12:18:24 +02:00
Peter Jaros 411a6a1f0c TodoMVC live demos have moved. 2014-10-24 09:57:27 -04:00
Paul O’Shannessy d36d26a574 [docs] Glossary
Pulled in https://gist.github.com/sebmarkbage/fcb1b6ab493b0c77d589
mostly verbatim
2014-10-23 20:51:11 -07:00
Paul O’Shannessy 4e5f5df4f6 Remove @jsx from examples 2014-10-23 20:51:11 -07:00
Paul O’Shannessy 4cfd8c6204 Update server servering example
It's referencing packages that aren't published yet but it *probably*
works...
2014-10-23 20:51:11 -07:00
Paul O’Shannessy f53854bd93 React.renderComponent -> React.render
This covers most everything. The perf suite still needs work for the
Element updates. And the server rendering example needs to be done
wholesale.
2014-10-23 20:51:11 -07:00
Paul O’Shannessy a90b4c9b3e Update properties/elements 2014-10-23 20:51:11 -07:00
Sebastian Markbåge ae8771fe2e Merge pull request #2084 from kimagure/unmount-comp-error
Error when unmountComponentAtNode receives non-node
2014-10-23 12:53:40 -07:00
Sebastian Markbåge 29bcda463e Merge pull request #2387 from fabiomcosta/avoid_double_scrollread
avoid reading the scroll position twice
2014-10-23 12:51:23 -07:00
Sebastian Markbåge b7cd3e7d1d Merge pull request #2396 from sebmarkbage/classmodule
Move Class Creation Concerns into a ReactClass Module
2014-10-23 12:50:17 -07:00
Sebastian Markbage 7ce8c844bd Hide ReactElement constructor
This prevents feature tests like:

var ReactElement = React.createElement(...).constructor;

if (element.constructor === ReactElement)

This is intentional so that we have the option to make these plain objects.
E.g. for direct inlining or replacing them with value types.
2014-10-23 12:08:14 -07:00
Sebastian Markbåge 4aee2a9c28 Merge pull request #2405 from sebmarkbage/hideelementconstructor
Hide ReactElement constructor
2014-10-23 12:06:16 -07:00
Paul O’Shannessy 8de03c47dd Merge pull request #2397 from mjul/fix-gruntfile
Added missing semicolon after statement.
2014-10-23 12:01:55 -07:00
Sebastian Markbage 20af6b0a14 Hide ReactElement constructor
This prevents feature tests like:

var ReactElement = React.createElement(...).constructor;

if (element.constructor === ReactElement)

This is intentional so that we have the option to make these plain objects.
E.g. for direct inlining or replacing them with value types.
2014-10-23 10:53:57 -07:00
Martin Jul 994fc7d8a7 Merge remote-tracking branch 'upstream/master' into fix-gruntfile 2014-10-23 09:55:43 +02:00
Martin Jul c9fb57feb3 Added missing semicolons identified by using `grunt jshint:project`. 2014-10-23 09:54:13 +02:00
Ben Alpert 32630cd8cf Fix typo in 0.12 RC blog post 2014-10-23 00:45:33 -07:00
Sebastian Markbage d9fe40e147 Move Class Creation Concerns to ReactClass
This moves logic responsible for class creation and mixins into
the ReactClass module. This currently creates a class that extends
the ReactCompositeBase but in the future, this will be decoupled as
ReactCompositeComponent will compose these classes.

This is just a cut/paste.
2014-10-22 21:25:20 -07:00
Sebastian Markbage c7bb936566 Introduce React Class as an alias for Composite Component
This is in preparation for the separation of Composite Component internals
from the Class abstraction.
2014-10-22 18:35:10 -07:00
Lee Byron d545238fd9 Merge pull request #2376 from leebyron/iterable
Allow iterables in traverseAllChildren
2014-10-22 18:18:08 -07:00
Ben Alpert de1dacdb28 Refactor composite component update flow
Fixes #1392.

Previously, ReactComponent.updateComponent set the new props and owner and updated the component's refs. Because it did the actual props assignment, it had to be called by ReactCompositeComponent between componentWillMount and componentDidMount, meaning that it was skipped if shouldComponentUpdate returned false. Now, updateComponent takes the old and new descriptors and only updates refs, allowing a subclass to call updateComponent at a convenient time (specifically, it can be before `this._descriptor` is updated if the subclass also overrides performUpdateIfNecessary).

The new update cycle for composites is:

- receiveComponent is called which stores `this._pendingDescriptor` and calls performUpdateIfNecessary directly or a state update is enqueued, in which case ReactUpdates will call performUpdateIfNecessary
- performUpdateIfNecessary ensures that an update is still pending (which might no longer be the case if an update is queued for a subcomponent that was updated through a parent's reconciliation) and calls updateComponent with the old and new descriptors
- updateComponent calls super to update refs, then calls componentWillReceiveProps (if applicable) and shouldComponentUpdate -- if shouldComponentUpdate returns false, `this._descriptor`, `this.props`, and `this.state` are updated and the update is skipped; else, _performComponentUpdate is called
- _performComponentUpdate calls componentWillUpdate and _updateRenderedComponent, and enqueues the componentDidUpdate call (in that order)
- _updateRenderedComponent calls render and updates the rendered component appropriately

For DOM components (essentially unchanged):

- receiveComponent is called which does a short-circuit check for descriptor equality and delegates to super (which stores `this._pendingDescriptor` and calls performUpdateIfNecessary)
- performUpdateIfNecessary (not overridden) sets new values for `this.props`, etc. and calls updateComponent
- updateComponent does the DOM property and children updates (some synchronously, some queued for the transaction close)

For text and ART components (unchanged):

- receiveComponent updates the DOM or ART directly based on the new props
- updateComponent is never called

Notable changes:

- When shouldComponentUpdate returns false, refs are still updated
- ReactDefaultPerf now includes lifecycle methods in component timings
- updateComponent's signature changed (technically this is part of the public API, though we've never documented it)

Test Plan: jest
2014-10-22 17:59:58 -07:00
Ben Alpert 9c2125599c Add \n after <textarea> to fix missing linebreaks
Same for <pre> and <listing>. Browsers are crazy.

Test Plan: jest, verify in Chrome that starting textareas with a value starting with two newlines renders both newlines instead of one newline, as it did before.
2014-10-22 17:24:24 -07:00
Martin Jul 70fdd5a287 Added missing semicolon after statement. 2014-10-22 23:46:54 +02:00
Paul O’Shannessy b78fe39b60 Bump version to 0.13.0-alpha 2014-10-22 14:19:54 -07:00
Paul O’Shannessy 5ffcec7552 Update travis-ci badge for 0.12-stable branch 2014-10-22 14:17:11 -07:00
Ben Alpert 5e2d926d65 Merge pull request #2372 from spicyj/docs012-1
Update docs to align with 0.12 better
2014-10-22 14:02:35 -07:00
Ben Alpert 52494f9d72 Update docs to align with 0.12 better
- Rename React.renderComponent -> React.render
- Remove most references to transferPropsTo
2014-10-22 14:01:54 -07:00
Paul O’Shannessy 85a98d4c8e Merge pull request #2322 from zpao/update-licenses-docs-examples
Update docs/examples with licenses
2014-10-22 13:13:56 -07:00