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

React 18 StrictMode Compatibility Plan/State #6572

Closed
jkillian opened this issue Nov 27, 2023 · 2 comments · Fixed by #6680
Closed

React 18 StrictMode Compatibility Plan/State #6572

jkillian opened this issue Nov 27, 2023 · 2 comments · Fixed by #6680

Comments

@jkillian
Copy link
Contributor

jkillian commented Nov 27, 2023

Question

Hello! More of a general question here than a bug/feature request. I was wondering if there's a place to see the current state of Blueprint React 18 StrictMode compatibility?

I see that the v5.0 migration guide mentions that some compatibility changes won't come until v6:

image

However, for the overlay issue for example, #3979 (comment) indicates that Overlay2 can be added in Blueprint v5.x. I also see there are some other related open issues, like this one about ContextMenu positioning: #5503. It seems like these all maybe just comes back to resolving #3979, which could be done in 5.x, before BP has full compatibility?

Given all this, I was curious if these changes were planned for an upcoming BP 5.x release or still going to be deferred until BP v6? And if the latter, if there was a rough estimate on when BP v6 was planned for?

My main motivation for asking these questions is I just wanted to get a grasp on the feasibility of using Blueprint with React 18's concurrency features (which StrictMode should help test compatibility for). Thanks for any information!

@adidahiya
Copy link
Contributor

adidahiya commented Jan 22, 2024

I'm getting pretty close with the Overlay2 implementation which ditches ReactDOM.findDOMNode, expect this to land in a release by end of this month: #6656

And then that only leaves Portal which uses legacy context (I think that wiki page you screenshotted is outdated, since @blueprintjs/table doesn't use context right now).

The current Portal component which is backwards-compatible with legacy context seems to be rendering fine inside <React.StrictMode> in #6656, so I think Blueprint should be compatible with strict mode in v5.x with the release of Overlay2.

Edit: Portal produces a deprecation warning in strict mode, but I don't think this will prohibit the rest of your application from being strict mode compatible. The checks only run in development anyway:

image

@jkillian
Copy link
Contributor Author

jkillian commented Feb 1, 2024

Amazing, thanks for the updates and work @adidahiya!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants