Skip to content

Commit

Permalink
Add support for React 17 and 18 (fiber key changed)
Browse files Browse the repository at this point in the history
Fixes arqex#14
  • Loading branch information
JoshuaCWebDeveloper committed Jan 6, 2023
1 parent 04cf325 commit d6a8fcc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions react-dom-instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ function getFiberFromNode(node) {

function getFiberKey(node) {
return Object.keys(node).find(key => (
key.startsWith('__reactInternalInstance$')
key.startsWith('__reactInternalInstance$') ||
key.startsWith('__reactFiber$')
));
}

Expand Down Expand Up @@ -88,4 +89,4 @@ function warn( msg ){
}

module.exports.findInstance = findInstance;
module.exports = {findInstance};
module.exports = {findInstance};

0 comments on commit d6a8fcc

Please sign in to comment.