Closed
Description
The transitions example currently gives this console warning when switching away from the dashboard page:
Invalid access to component property "refs" on Form at the top level. See http://fb.me/react-warning-descriptors . Use a static method instead:
.type.refs(...)
because of the line
if (component.refs.userInput.getDOMNode().value !== '') {
in transitions/app.js, but the router passes the component descriptor (basically just type
and props
) to the willTransitionFrom function.
In React master, I don't believe the example will work at all because descriptors and components have been more properly separated. If the intention is for willTransitionFrom to receive the actual component instance, your best approach is probably to use cloneWithProps in conjunction with new-style refs (facebook/react#1554) after that lands.
Metadata
Metadata
Assignees
Labels
No labels