Skip to content

[@next] findDOMNode is deprecated in StrictMode #239

@cutterbl

Description

@cutterbl

So I was playing around with the @next build of react-input-mask, and specifically the bit about being able to wrap custom components. I was making some progress, but notice the following error hitting the console

findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of InputMaskChildrenWrapper 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

You can see this in the CodeSandbox I created for testing. I provided some very basic commenting in the InputWrapper and Input components about basic usage.

Also, attempting to change my input value (in the input) threw an Error about string.split not being a function?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions