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
Fluent provider react18 #1
Conversation
@@ -3,25 +3,47 @@ import * as React from 'react'; | |||
import type { FluentProviderState } from './FluentProvider.types'; | |||
import { fluentProviderClassNames } from './useFluentProviderStyles'; | |||
|
|||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | |||
const useInsertionEffect = (React as any)['useInsertion' + 'Effect']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add a comment here that explains why we write this as ['useInsertion' + 'Effect']
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be honest, i'm not sure if it is necessary as this repo has different rules than griffel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case it's worth experimenting with a CRA app to see if we need to do this. In the linked Emotion issue the problem didn't pop up in Emotion but in a consumer of Emotion using React 17.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will cause problems on consumer side, please check microsoft#23625 (comment)
closing this as it was just a test run |
init approach of supporting fluent provider in react 18 strict mode