Skip to content

Commit 2e3130c

Browse files
committed
Add support for React 16
`findDOMNode` is slated for deprecation soon, and support in React 16 appears to be partially dropped already. For us to transition completely away from it, we would need to pass a ref prop down to the provided `content` component, including it as part of the `FlowTip` api. This is less ideal than automatically resolving the correct ref as `findDOMNode` currently does and would make the lib more complicated to use. Until `findDOMNode` support is dropped completely, or we decide on a clean mechanism for passing the ref around, we rely on a custom `findDOMNOde` function that will safely attempt to detect the rendered node using react fiber internals when necessary. This universally supports React 16 and earlier versions. (See: https://stackoverflow.com/questions/48062095/update-to-react-16-finddomnode-stops-working#answer-48273014)
1 parent 449f728 commit 2e3130c

4 files changed

Lines changed: 783 additions & 663 deletions

File tree

0 commit comments

Comments
 (0)