question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deprecated Context and reference.

See original GitHub issue

Hi, some usage of Select are now deprecated by React. In addition to https://github.com/JedWatson/react-select/issues/3191 there are also some problem with context:

Warning: Legacy context API has been detected within a strict-mode tree: 
    in StrictMode
    in ErrorBoundary
    in Unknown (created by HotExportedComponent)
    in AppContainer (created by HotExportedComponent)
    in HotExportedComponent

Please update the following components: MenuPlacer

Learn more about this warning here:
https://fb.me/react-strict-mode-warnings

and reference:

Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of NodeResolver which is inside StrictMode. Instead, add a ref directly to the element you want to reference.

    in div (created by Context.Consumer)
    in EmotionCssPropInternal (created by MenuList)
    in MenuList (created by MenuPlacer)
    in ScrollBlock (created by MenuPlacer)
    in NodeResolver (created by ScrollCaptor)
    in ScrollCaptor (created by ScrollCaptorSwitch)
    in ScrollCaptorSwitch (created by MenuPlacer)
    in div (created by Context.Consumer)
    in EmotionCssPropInternal (created by Menu)
    in Menu (created by MenuPlacer)
    in MenuPlacer (created by Select)
    in div (created by Context.Consumer)
    in EmotionCssPropInternal (created by SelectContainer)
    in SelectContainer (created by Select)
    in Select (created by StateManager)
    in StateManager (created by Select)
    ...

Learn more about using refs safely here:
https://fb.me/react-strict-mode-find-node

You can see them here: https://codesandbox.io/embed/react-codesandboxer-example-vhvre

Thanks. Matt’

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:45
  • Comments:24 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
olelivalifecommented, Sep 28, 2020

@hiimagu The solution has been merged, but not released yet.

When do you plan to release it?

3reactions
dpordomingocommented, Feb 11, 2020

Legacy context API warning should be partially addressed by https://github.com/JedWatson/react-select/pull/3928

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deprecated and obsolete features - JavaScript - MDN Web Docs
This page lists features of JavaScript that are deprecated (that is, still available but planned for removal) and obsolete (that is, ...
Read more >
Android Context Deprecated - Stack Overflow
It seems life of component is deprecated. I shocked while reading your question. Context is not deprecated.
Read more >
Important changes (deprecations) coming in Power Apps and ...
Important. "Deprecated" means we intend to remove the feature or capability from a future release. The feature or capability will continue ...
Read more >
Context | Android Developers
AccountAuthenticatorActivity, This class was deprecated in API level 30. ... garbage collection determines that there are no more references to the object.
Read more >
ReactCasts #5 - Context (Part 2) (Deprecated) - YouTube
Context Part 2 shows how to use Higher-Order-Components and subscriptions to use React's Context safely.Source code & episode requests: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found