forked from cljsjs/packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
React 0.14.0 extern improvements; closes cljsjs#265
* Change react-dom extern path to match packaging guidelines. * Adds missing extern symbols (especially in react-dom). * Removes some symbols removed by React 0.14.0 (not done thoroughly). * Marks @depreciated some symbols depreciated by React 0.14.0.
- Loading branch information
1 parent
1f8e7e7
commit bbf6f4c
Showing
7 changed files
with
126 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
114 changes: 114 additions & 0 deletions
114
react-dom/resources/cljsjs/react-dom/common/react-dom.ext.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
/** | ||
* @fileoverview Closure Compiler externs for Facebook ReactDOM.js DOM 0.14.0 | ||
* @see http://reactjs.org | ||
* @externs | ||
*/ | ||
|
||
|
||
/** | ||
* The ReactDOM global object. | ||
* | ||
* @type {!Object} | ||
* @const | ||
*/ | ||
var ReactDOM = {}; | ||
|
||
|
||
/** | ||
* The current version of ReactDOM. | ||
* | ||
* @type {string} | ||
* @const | ||
*/ | ||
ReactDOM.version; | ||
|
||
|
||
/** | ||
* @param {React.ReactComponent} container | ||
* @param {Element} mountPoint | ||
* @param {function=} callback | ||
* @return {React.ReactComponent} | ||
*/ | ||
ReactDOM.render = function(container, mountPoint, opt_callback) {}; | ||
|
||
|
||
/** | ||
* @param {Element} container | ||
* @return {boolean} | ||
*/ | ||
ReactDOM.unmountComponentAtNode = function(container) {}; | ||
|
||
|
||
/** | ||
* @param {React.ReactComponent} component | ||
* @return {Element} | ||
*/ | ||
ReactDOM.findDOMNode = function(component) {}; | ||
|
||
|
||
/** | ||
* Call the provided function in a context within which calls to `setState` | ||
* and friends are batched such that components aren't updated unnecessarily. | ||
* | ||
* @param {function} callback Function which calls `setState`, `forceUpdate`, etc. | ||
* @param {*=} opt_a Optional argument to pass to the callback. | ||
* @param {*=} opt_b Optional argument to pass to the callback. | ||
* @param {*=} opt_c Optional argument to pass to the callback. | ||
* @param {*=} opt_d Optional argument to pass to the callback. | ||
* @param {*=} opt_e Optional argument to pass to the callback. | ||
* @param {*=} opt_f Optional argument to pass to the callback. | ||
*/ | ||
ReactDOM.unstable_batchedUpdates = function(callback, opt_a, opt_b, opt_c, opt_d, opt_e) {}; | ||
|
||
/** | ||
* Renders a React component into the DOM in the supplied `container`. | ||
* | ||
* If the React component was previously rendered into `container`, this will | ||
* perform an update on it and only mutate the DOM as necessary to reflect the | ||
* latest React component. | ||
* | ||
* @param {React.ReactComponent} parentComponent The conceptual parent of this render tree. | ||
* @param {React.ReactElement} nextElement Component element to render. | ||
* @param {Element} container DOM element to render into. | ||
* @param {function=} callback function triggered on completion | ||
* @return {React.ReactComponent} Component instance rendered in `container`. | ||
*/ | ||
ReactDOM.unstable_renderSubtreeIntoContainer = function(parentComponent, nextElement, container, opt_callback) {}; | ||
|
||
|
||
/** | ||
* The ReactDOMServer global object. | ||
* | ||
* @type {!Object} | ||
* @const | ||
*/ | ||
var ReactDOMServer = {}; | ||
|
||
|
||
/** | ||
* The current version of ReactDOMServer. | ||
* | ||
* @type {string} | ||
* @const | ||
*/ | ||
ReactDOMServer.version; | ||
|
||
/** | ||
* Render a ReactElement to its initial HTML. | ||
* | ||
* @param {React.ReactElement} element | ||
* @return {string} | ||
*/ | ||
ReactDOMServer.renderToString = function(element) {}; | ||
|
||
|
||
/** | ||
* Similar to renderToString, except this doesn't create extra DOM attributes | ||
* such as data-react-id, that React uses internally. This is useful if you want | ||
* to use React as a simple static page generator, as stripping away the extra | ||
* attributes can save lots of bytes. | ||
* | ||
* @param {React.ReactElement} element | ||
* @return {string} | ||
*/ | ||
ReactDOMServer.renderToStaticMarkup = function(element) {}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters