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

Deprecated Context and reference. #3703

Closed
mathieutu opened this issue Aug 1, 2019 · 24 comments · Fixed by #3928
Closed

Deprecated Context and reference. #3703

mathieutu opened this issue Aug 1, 2019 · 24 comments · Fixed by #3928
Labels
issue/bug-confirmed Issues about a bug that has been confirmed by a maintainer issue/reviewed Issue has recently been reviewed (mid-2020)

Comments

@mathieutu
Copy link

Hi, some usage of Select are now deprecated by React.
In addition to #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'

dpordomingo added a commit to dpordomingo/react-select that referenced this issue Feb 11, 2020
This solves JedWatson#3916, and partially addresses JedWatson#3703.
From React 16.3 the old Context API was deprecated and
it's rising warnings when runng in strict-mode.
dpordomingo added a commit to dpordomingo/react-select that referenced this issue Feb 11, 2020
This solves JedWatson#3916, and partially addresses JedWatson#3703.
From React 16.3 the old Context API was deprecated and
it's rising warnings when runng in strict-mode.
dpordomingo added a commit to dpordomingo/react-select that referenced this issue Feb 11, 2020
This solves JedWatson#3916, and partially addresses JedWatson#3703.
From React 16.3 the old Context API was deprecated and
it's rising warnings when runng in strict-mode.
@dpordomingo
Copy link
Contributor

Legacy context API warning should be partially addressed by #3928

@bladey bladey added the issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet label Jun 1, 2020
@bladey bladey linked a pull request Jun 10, 2020 that will close this issue
@bladey bladey added issue/bug-confirmed Issues about a bug that has been confirmed by a maintainer and removed issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet labels Jun 10, 2020
@bladey bladey linked a pull request Jun 10, 2020 that will close this issue
@bladey bladey added the pr/priority PRs that should be addressed sooner rather than later label Jun 10, 2020
@bladey bladey removed the pr/priority PRs that should be addressed sooner rather than later label Jun 10, 2020
@bladey bladey added the issue/reviewed Issue has recently been reviewed (mid-2020) label Jun 18, 2020
@bladey bladey closed this as completed Jun 23, 2020
@bladey bladey reopened this Jul 7, 2020
@hemant171k
Copy link

where is solution . if not then why its been closed?

@bladey
Copy link
Contributor

bladey commented Aug 24, 2020

Hi @hemant171k, it's currently open.

@hiimagu
Copy link

hiimagu commented Sep 27, 2020

Im still having this issue. Did you already merge the solution?

@Methuselah96
Copy link
Collaborator

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

@olelivalife
Copy link

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

When do you plan to release it?

@Methuselah96
Copy link
Collaborator

@olelivalife There is no definite release date and it seems unlikely that it will be soon. The last publish was on March 22. @JedWatson and @bladey have mentioned that they're trying to get a publish out "as soon as possible," but I wouldn't count on it happening anytime soon.

@piaro
Copy link

piaro commented Oct 12, 2020

I hope that this problem is resolved quickly.

@pdipeshiw
Copy link

When will we get the fixed version of the release?

@MaximilianLloyd
Copy link

Is there any workaround for this yet?

@Methuselah96
Copy link
Collaborator

@MaximilianLloyd I've started a fork where this is fixed in react-select-oss@3.1.1.

@MrDogeBro
Copy link

Has this new version that fixes this issue been released yet? I am currently using 3.1.1 and the error is still occurring there.

@Methuselah96
Copy link
Collaborator

@MrDogeBro Track #4094 for more info. The plan is to release the fixes for this in a 4.0 release.

@MrDogeBro
Copy link

@Methuselah96 ok sounds good. Any ideas on when this update should be released?

@Methuselah96
Copy link
Collaborator

@MrDogeBro It's primarily dependent on Jed's availability. My guess is sometime within 1-2 months.

@abhimanusharma
Copy link

@Methuselah96 is the fixed yet?

@Methuselah96
Copy link
Collaborator

@abhimanusharma Yes, it was fixed in react-select@4.0.0.

@cannon303
Copy link

I'm still getting this error. I've tested everything I can think of to make sure I am up to date but the error remains.

@Methuselah96
Copy link
Collaborator

Can you provide the error message you're getting?

@cannon303
Copy link

Warning: Legacy context API has been detected within a strict-mode tree.

The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.

Please update the following components: Transition, TransitionGroup

Learn more about this warning here: https://reactjs.org/link/legacy-context
TransitionGroup@http://localhost:3000/static/js/vendors~main.chunk.js:326866:30
Route@http://localhost:3000/static/js/vendors~main.chunk.js:324374:29
div
div
TransGroup@http://localhost:3000/static/js/main.chunk.js:1662:88
Router@http://localhost:3000/static/js/vendors~main.chunk.js:324005:30
HashRouter@http://localhost:3000/static/js/vendors~main.chunk.js:323573:35

@cannon303
Copy link

It doesn't work either. No transitions.

@Methuselah96
Copy link
Collaborator

Methuselah96 commented Sep 27, 2021

Just to confirm, have you tried react-select v5?

@cannon303
Copy link

cannon303 commented Sep 27, 2021

No sorry I realise now this issue thread is related specifically to that isn't it.

@Methuselah96
Copy link
Collaborator

Yeah, we focus our efforts on supporting the latest major version (react-select v5 at the moment). I believe the issue has been fixed in react-select v5 and we don't currently have plans to back-port the fix to earlier major versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/bug-confirmed Issues about a bug that has been confirmed by a maintainer issue/reviewed Issue has recently been reviewed (mid-2020)
Projects
None yet
Development

Successfully merging a pull request may close this issue.