Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

findDOMNode is deprecated in StrictMode #7

Open
barabo opened this issue Sep 8, 2020 · 0 comments
Open

findDOMNode is deprecated in StrictMode #7

barabo opened this issue Sep 8, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@barabo
Copy link
Contributor

barabo commented Sep 8, 2020

Ever since I put a custom <Resource> element as a child of a blueprint <Checkbox> element, I've seen errors like this in the console:

index.js:1 Warning: findDOMNode is deprecated in StrictMode.
findDOMNode was passed an instance of Blueprint3.ResizeSensor
which is inside StrictMode. Instead, add a ref directly to the element
you want to reference. Learn more about using refs safely here:
https://fb.me/react-strict-mode-find-node
    in span (created by InnerReference)
    in Blueprint3.ResizeSensor (created by InnerReference)
    in InnerReference (created by Context.Consumer)
    in Reference (created by Blueprint3.Popover)
    in span (created by Blueprint3.Popover)
    in Manager (created by Blueprint3.Popover)
    in Blueprint3.Popover (created by Blueprint3.Tooltip)
    in Blueprint3.Tooltip (at FHIRResource.js:48)
    in Resource (at ListsPanel.js:17)
    in label (created by Control)
    in Control (created by Blueprint3.Checkbox)
    in Blueprint3.Checkbox (at ListsPanel.js:16)
    in td (at ListsPanel.js:15)
    in tr (at ListsPanel.js:14)
    in tbody (at ListsPanel.js:34)
    in table (at ListsPanel.js:33)
    in ListSelector (at ListsPanel.js:135)
    in div (at ListsPanel.js:132)
    in ListsPanel (at App.js:49)
    in div (at App.js:48)
    in div (at App.js:47)
    in div (at App.js:32)
    in App (at src/index.js:9)
    in StrictMode (at src/index.js:8)

The offending lines are as follows in ListPanel.js:

     1  import { drain, getRefsFrom, filterLists } from 'api';
     2  import React from 'react';
     3  import 'components/ListsPanel.css'
     4  import { Checkbox } from "@blueprintjs/core";
     5  import { Resource } from 'components/FHIRResource';
     6  
     7  const debug = false;  // XXX
     8  
     9  // A FHIR Resource in a table row.
    10  function ResourceRow(props) {
    11    const resource = props.resource;
    12    const key = `${resource.resourceType}/${resource.id}`;
    13    return (
    14      <tr key={key}>
    15        <td>
    16          <Checkbox>
    17            <Resource
    18              display={resource.name}
    19              resource={resource}
    20            />
    21          </Checkbox>
    22        </td>
    23      </tr>
@barabo barabo added the bug Something isn't working label Sep 8, 2020
@barabo barabo self-assigned this Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant