Issue by petetnt
Wednesday Dec 30, 2015 at 15:45 GMT
Originally opened as adobe/brackets#12035
This PR updates React to the newest version of 0.14.5 and Immutable to go with it.
Updating React at this point is pretty crucial (IMO) if React is continued to be used: in 0.14 there were a lot of breaking changes that are still relatively easy to fix: biggest thing was how DOM-elements are being handled in React. For example: DOM operations like render are now being handled by ReactDOM-module, getDOMNode has been deprecated for the components, this.refs.componentref returns the DOM node directly instead of the component and so on.
This PR also updates the tests involved: it fixes instances where TestUtils were used to find non-component (plain HTML) DOM Nodes and it also fixes all instances where props were being accessed instead of the DOM Nodes itself, which caused the following warnings: Warning: ReactDOMComponent: Do not access .props of a DOM node; instead, recreate the props asrenderdid originally or read the DOM properties/attributes directly from this node (e.g., this.refs.box.className).
The PR has been done in backwards compatible fashion to the extent it is possible: extensions that are using deprecated methods and features should update themself before React on Brackets is updated to 0.15 some time in the future.
petetnt included the following code: https://github.com/adobe/brackets/pull/12035/commits
Wednesday Dec 30, 2015 at 15:45 GMT
Originally opened as adobe/brackets#12035
This PR updates React to the newest version of
0.14.5and Immutable to go with it.Updating React at this point is pretty crucial (IMO) if React is continued to be used: in 0.14 there were a lot of breaking changes that are still relatively easy to fix: biggest thing was how DOM-elements are being handled in React. For example: DOM operations like
renderare now being handled byReactDOM-module,getDOMNodehas been deprecated for the components,this.refs.componentrefreturns the DOM node directly instead of the component and so on.This PR also updates the tests involved: it fixes instances where TestUtils were used to find non-component (plain HTML) DOM Nodes and it also fixes all instances where
propswere being accessed instead of the DOM Nodes itself, which caused the following warnings:Warning: ReactDOMComponent: Do not access .props of a DOM node; instead, recreate the props asrenderdid originally or read the DOM properties/attributes directly from this node (e.g., this.refs.box.className).The PR has been done in backwards compatible fashion to the extent it is possible: extensions that are using deprecated methods and features should update themself before React on Brackets is updated to 0.15 some time in the future.
petetnt included the following code: https://github.com/adobe/brackets/pull/12035/commits