Skip to content

Commit

Permalink
RN findNodeHandle no longer adds props directly to read-only owner
Browse files Browse the repository at this point in the history
  • Loading branch information
bvaughn committed Aug 23, 2017
1 parent f1094ac commit 6e82ddd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderers/native/findNodeHandle.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function findNodeHandle(componentOrHandle: any): any {
var owner = ((ReactCurrentOwner.current: any): ReactInstance | null);
if (owner !== null) {
warning(
owner._warnedAboutRefsInRender,
owner.stateNode._warnedAboutRefsInRender,
'%s is accessing findNodeHandle inside its render(). ' +
'render() should be a pure function of props and state. It should ' +
'never access something that requires stale data from the previous ' +
Expand All @@ -73,7 +73,7 @@ function findNodeHandle(componentOrHandle: any): any {
getComponentName(owner) || 'A component',
);

owner._warnedAboutRefsInRender = true;
owner.stateNode._warnedAboutRefsInRender = true;
}
}
if (componentOrHandle == null) {
Expand Down

0 comments on commit 6e82ddd

Please sign in to comment.