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

Support React 18 #1900

Closed
juandgarin opened this issue May 17, 2022 · 48 comments
Closed

Support React 18 #1900

juandgarin opened this issue May 17, 2022 · 48 comments
Assignees

Comments

@juandgarin
Copy link

When i try to install the library, it returns me an error indicating that there are dependencies that cant resolve.

Anyone with the same problem?

I think it is a React 18 issue

Screenshot 2022-05-17 at 06 09 36

@mgamis-msft
Copy link
Contributor

Hi @juandgarin, thank you for filing this issue. I will look into this today.

@mgamis-msft
Copy link
Contributor

Hi @juandgarin, our dependency on fluent ui library restricts our package from using React 18 or higher. What is your use case for backoffice_next@0.1.0? Is it possible to use another version of backoffice that does not rely on React 18?

@prprabhu-ms
Copy link
Contributor

Hi @juandgarin I don't expect us to be able to lift the < React18 requirement easily at the moment (Fluentv8 recently moved to React 17, and I'm not aware of any plans to move beyond React18+)

Closing this issue as it is not currently actionable, but please feel free re-open with any more information / insight you have for the need for React 18+

@prprabhu-ms
Copy link
Contributor

Actually, let's keep this open to track when FluentUI goes to React 18 and then this issue will be actionable: microsoft/fluentui#22592

@prprabhu-ms prprabhu-ms reopened this May 30, 2022
@prprabhu-ms prprabhu-ms changed the title Cant be installed Support React 18 May 30, 2022
@prprabhu-ms
Copy link
Contributor

It is still unclear if Fluentv8 will gain React18 support at all: microsoft/fluentui#22592 (comment)

@sai0909
Copy link

sai0909 commented Jun 1, 2022

I am also facing the same issue when I followed these steps. https://azure.github.io/communication-ui-library/?path=/docs/quickstarts-uicomponents--page

@prprabhu-ms
Copy link
Contributor

@sai0909 Can you try downgrading to React v17 to see if it fixes your issue?

@prprabhu-ms
Copy link
Contributor

It is a big problem that anybody using our quickstart will currently hit the problem posted in OP.

I confirmed that downgrading the app to React 17 with

npm install react@17 react-dom@17 @testing-library/react@12 @types/react@17 @types/react-dom@17

almost fixes the issue.
The problem is that react-dom had a breaking change from v17 -> v18 so that the create-react-app generated boilerplate doesn't work with React 17.

If you modify the generated index.tsx to be

import React from 'react';
import { render }  from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';

const container = document.getElementById('root');
render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
  container
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();

Then the quickstart works correctly.

But... that is terrible devX. Still looking for less manual workarounds.

@prprabhu-ms
Copy link
Contributor

Honestly, this is a fairly large feature gap in create-react-app. There is no way to use an older version of react libraries with that tool. Maybe they'll have a fix for it soon... facebook/create-react-app#12269

@piotrzaborow
Copy link

It's not only about CRA. Next.js has their own CLI for creating new apps and usage of latest version will always bring React 18+.

I understand the complexity of migration, but not supporting new versions of React just places Fluent UI React as no-go for new React-based projects.

Of course I can downgrade, but I will lack of new Next.js features.

@prprabhu-ms
Copy link
Contributor

@piotrzaborow we're following up on both forks:

  • Track Fluent UI React upgrade to React 18
  • Deliver a workaround that unbreaks new apps using @azure/communication-react right now.

I learnt that it is possible to set React versions via CRA templates, so we will explore that option in the short term.

@micahgodbolt
Copy link

I'm working on React 18 support in Fluent UI right now. The changes in Strict mode are causing a good bit of churn, so we have some work ahead of us to get all of our controls working properly in React 18. For clarity, what version of Fluent UI is your package dependent on?

@micahgodbolt
Copy link

It took longer than expected, but peer deps have been updated. Both v8 and v9 will be usable within react 18 upon the next release.

@krista-m-bledsoe
Copy link

@micahgodbolt - Do you have plans or know when the communication-ui-library will be upgraded to using v9 of Fluent UI ?

@develohpanda
Copy link

Hi @micahgodbolt, while the @fluentui/react warning has now disappeared for me, I've still got a few others.

image

Do you know when the updated peer dependencies for @azure/communication-react and bundled dependency upgrades, will be published? For example, I can see that @fluentui/react-northstar is a fixed dependency in @azure/communication-react at v0.61.0, however they have published v0.65.0.

@JamesBurnside
Copy link
Member

JamesBurnside commented Nov 17, 2022

@develohpanda we have made progress on most dependencies, but we have a final blocker from permitting react 18 as a peer dependency on microsoft/fluentui#25651

@develohpanda
Copy link

@JamesBurnside that's awesome! Please let me know if there's anything I can do to help it along. :)

@hyunoosung
Copy link

Yeah the only reason our projects are held up for react 18 is this package please re consider supporting react 18

@micahgodbolt
Copy link

Hi @micahgodbolt, while the @fluentui/react warning has now disappeared for me, I've still got a few others.

image

Do you know when the updated peer dependencies for @azure/communication-react and bundled dependency upgrades, will be published? For example, I can see that @fluentui/react-northstar is a fixed dependency in @azure/communication-react at v0.61.0, however they have published v0.65.0.

The northstar project was originally under under Teams engineering. @jurokapsiar would be the best one to talk to about React 18 support. Do you know how critical the northstar dependency is for your package?

@develohpanda
Copy link

develohpanda commented Jan 18, 2023

Presumably quite important as we are using the acs libraries to embed Teams within our site. I could try and track that dependency through the GitHub packages.

@hades200082
Copy link

This should have been updated before React 17 went EOL. Can't believe 18 is still not supported over a year later!

@martinesmann
Copy link

+1 this is a huge blocker. The silence and missing official statement is also a raising concern.
Is this project about to be abandoned or has that already happened?

@hyunoosung
Copy link

hyunoosung commented Apr 13, 2023

All the samples and sdks I use is for react 18+ but this...

@simon-guider
Copy link

@prprabhu-ms please remove the blocked label from this issue as fluent-ui has been updated to React 18 microsoft/fluentui#22592

@JamesBurnside
Copy link
Member

Greetings Friends, we want to thank the community for working with us and providing valuable feedback for us to understand where we should be prioritizing our work. To recap some of the previous discussion above, @azure/communication-react currently leverages components from @fluentui/react-northstar, which does not support React 18.

To address to problem, we have been working with our partner teams in Fluent over the last several months to build a migration strategy to Fluent v9. This migration will allow @azure/communication-react to support React 18. The main blocker we are focusing on is a direct replacement for the Chat components from @fluentui/react-northstar. Once that component is ready, it will unblock the migration. We will be tracking the migration and providing updates in a separate issue: #2924

However, we expect the full migration to Fluent React v9 to take some time. Therefore, to help unblock you, we are putting in motion a short-term plan mitigate the issue with React 18. Come join the discussion here: Unblocking react 18 · Azure/communication-ui-library · Discussion #2939 · GitHub

We really appreciate the overall support as we work towards solving this issue!

@hyunoosung
Copy link

Good news something is going on!
https://github.com/Azure/communication-ui-library/blob/jaburnsi/upgrade-to-react-18/packages/communication-react/package.json

@JamesBurnside
Copy link
Member

Hi folks, we have released @azure/communication-react@1.5.1-beta.5 with react 18 support.
Please try it out and let us know if you find any issues. Pending no major issues are found this will go into our upcoming stable release.

@DercilioFontes
Copy link

DercilioFontes commented Jun 1, 2023

Hi @JamesBurnside,

I'm testing the new version. Everything looks good but crashes in React strict mode when the ChatComposite is removed.
I do something like that:

...
{chatAdapter && <ChatComposite
    fluentTheme={customTheme}
    onFetchAvatarPersonaData={() => Promise.resolve(avatarPersonaData)}
    options={{ topic: false }}
    adapter={chatAdapter}
  />}
...

And when the chat ends, it calls the chatAdapter dispose and sets the chatAdapter to undefined. It results in a blank screen with this error. Removing the React strict mode makes it work fine.
853754713-image

I also see this warning when it is mounted.
Screenshot 2023-06-01 at 9 04 17 AM

My stack:
"@azure/communication-chat": "^1.3.2-beta.1",
"@azure/communication-common": "^2.2.0",
"@azure/communication-react": "^1.5.1-beta.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^8.0.7",
"@reduxjs/toolkit": "^1.9.5",
"redux-persist": "^6.0.0",
"typescript": "^5.0.4",
"vite": "^4.3.9",

Complete errors:
Unmounting:

Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
    at https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:220393:27
    at safelyCallDestroy (https://localhost:8101/node_modules/.vite/deps/chunk-JZ3YVIXN.js?v=594098e6:16737:13)
    at commitDeletionEffectsOnFiber (https://localhost:8101/node_modules/.vite/deps/chunk-JZ3YVIXN.js?v=594098e6:17558:29)
    at recursivelyTraverseDeletionEffects (https://localhost:8101/node_modules/.vite/deps/chunk-JZ3YVIXN.js?v=594098e6:17482:13)
    at commitDeletionEffectsOnFiber (https://localhost:8101/node_modules/.vite/deps/chunk-JZ3YVIXN.js?v=594098e6:17499:17)
    at recursivelyTraverseDeletionEffects (https://localhost:8101/node_modules/.vite/deps/chunk-JZ3YVIXN.js?v=594098e6:17482:13)
    at commitDeletionEffectsOnFiber (https://localhost:8101/node_modules/.vite/deps/chunk-JZ3YVIXN.js?v=594098e6:17606:15)
    at recursivelyTraverseDeletionEffects (https://localhost:8101/node_modules/.vite/deps/chunk-JZ3YVIXN.js?v=594098e6:17482:13)
    at commitDeletionEffectsOnFiber (https://localhost:8101/node_modules/.vite/deps/chunk-JZ3YVIXN.js?v=594098e6:17573:15)
    at recursivelyTraverseDeletionEffects (https://localhost:8101/node_modules/.vite/deps/chunk-JZ3YVIXN.js?v=594098e6:17482:13)


The above error occurred in the <Provider> component:

    at e3 (https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:220353:19)
    at div
    at FocusRectsProvider (https://localhost:8101/node_modules/.vite/deps/chunk-4GAFNO7A.js?v=594098e6:4014:27)
    at https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:208394:45
    at FluentThemeProvider (https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:221729:11)
    at BaseProvider (https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:260803:11)
    at div
    at ChatComposite (https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:261456:11)
    at div
    at ResultComponent (https://localhost:8101/node_modules/.vite/deps/chunk-6U3BHGZF.js?v=594098e6:4232:68)
    at div
    at ResultComponent (https://localhost:8101/node_modules/.vite/deps/chunk-6U3BHGZF.js?v=594098e6:4232:68)
    at Chat (https://localhost:8101/src/components/chat/Chat.component.tsx:22:3)
    at ion-card-content
    at ReactComponent (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23289:7)
    at IonCardContent
    at ion-row
    at ReactComponent (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23289:7)
    at IonRow
    at ion-row
    at ReactComponent (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23289:7)
    at IonRow
    at AdvocateChat (https://localhost:8101/src/components/advocate/AdvocateChat.component.tsx:36:20)
    at ion-content
    at ReactComponent (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23289:7)
    at IonContent
    at div
    at PageManager (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23680:5)
    at IonPageInternal (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23729:5)
    at IonPage
    at AdvocateChatPage (https://localhost:8101/src/pages/advocate/AdvocateChat.page.tsx:93:19)
    at Suspense
    at Route2 (https://localhost:8101/node_modules/.vite/deps/chunk-FYZAQAMR.js?v=594098e6:772:29)
    at ViewLifeCycleManager (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:24553:5)
    at ion-router-outlet
    at ReactComponent (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23289:7)
    at IonRouterOutlet
    at StackManager (https://localhost:8101/node_modules/.vite/deps/@ionic_react-router.js?v=594098e6:225:5)
    at IonRouterOutletContainer (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23838:5)
    at IonRouterOutlet
    at div
    at ion-tabs
    at div
    at PageManager (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23680:5)
    at <anonymous> (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:24066:5)
    at AdvocateTabs (https://localhost:8101/src/routes/AdvocateTabs.router.tsx:32:21)
    at Suspense
    at Route2 (https://localhost:8101/node_modules/.vite/deps/chunk-FYZAQAMR.js?v=594098e6:772:29)
    at PrivateRoute (https://localhost:8101/src/helpers/router.helper.tsx:22:3)
    at Switch2 (https://localhost:8101/node_modules/.vite/deps/chunk-FYZAQAMR.js?v=594098e6:916:29)
    at MiddlewareRouter
    at NavManager (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:24720:5)
    at IonRouterInner (https://localhost:8101/node_modules/.vite/deps/@ionic_react-router.js?v=594098e6:484:5)
    at C2 (https://localhost:8101/node_modules/.vite/deps/chunk-FYZAQAMR.js?v=594098e6:955:37)
    at Router2 (https://localhost:8101/node_modules/.vite/deps/chunk-FYZAQAMR.js?v=594098e6:485:30)
    at IonReactHashRouter (https://localhost:8101/node_modules/.vite/deps/@ionic_react-router.js?v=594098e6:768:5)
    at ion-app
    at ReactComponent (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23289:7)
    at IonApp
    at IonApp (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23644:5)
    at App (https://localhost:8101/src/App.tsx:52:20)
    at PersistGate2 (https://localhost:8101/node_modules/.vite/deps/redux-persist_integration_react.js?v=594098e6:90:5)
    at Provider (https://localhost:8101/node_modules/.vite/deps/react-redux.js?v=594098e6:1173:3)

Mounting

Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of r3 which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node
    at ul
    at r3 (https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:217173:23)
    at https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:219252:16
    at LiveAnnouncer (https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:243885:68)
    at r3 (https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:217996:28)
    at qo2 (https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:218031:17)
    at div
    at ResultComponent (https://localhost:8101/node_modules/.vite/deps/chunk-6U3BHGZF.js?v=594098e6:4232:68)
    at r3 (https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:217996:28)
    at qo2 (https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:218031:17)
    at MessageThread (https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:244085:15)
    at div
    at ResultComponent (https://localhost:8101/node_modules/.vite/deps/chunk-6U3BHGZF.js?v=594098e6:4232:68)
    at div
    at ResultComponent (https://localhost:8101/node_modules/.vite/deps/chunk-6U3BHGZF.js?v=594098e6:4232:68)
    at div
    at ResultComponent (https://localhost:8101/node_modules/.vite/deps/chunk-6U3BHGZF.js?v=594098e6:4232:68)
    at ChatScreen (https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:261346:11)
    at ChatAdapterProvider (https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:260857:11)
    at div
    at ResultComponent (https://localhost:8101/node_modules/.vite/deps/chunk-6U3BHGZF.js?v=594098e6:4232:68)
    at WithBackgroundColor (https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:260842:11)
    at Customizer2 (https://localhost:8101/node_modules/.vite/deps/chunk-4GAFNO7A.js?v=594098e6:3295:45)
    at div
    at t5 (https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:219820:10)
    at Provider (https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:220337:89)
    at e3 (https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:220353:19)
    at div
    at FocusRectsProvider (https://localhost:8101/node_modules/.vite/deps/chunk-4GAFNO7A.js?v=594098e6:4014:27)
    at https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:208394:45
    at FluentThemeProvider (https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:221729:11)
    at BaseProvider (https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:260803:11)
    at div
    at ChatComposite (https://localhost:8101/node_modules/.vite/deps/@azure_communication-react.js?v=594098e6:261456:11)
    at div
    at ResultComponent (https://localhost:8101/node_modules/.vite/deps/chunk-6U3BHGZF.js?v=594098e6:4232:68)
    at div
    at ResultComponent (https://localhost:8101/node_modules/.vite/deps/chunk-6U3BHGZF.js?v=594098e6:4232:68)
    at Chat (https://localhost:8101/src/components/chat/Chat.component.tsx:22:3)
    at ion-card-content
    at ReactComponent (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23289:7)
    at IonCardContent
    at ion-row
    at ReactComponent (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23289:7)
    at IonRow
    at ion-row
    at ReactComponent (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23289:7)
    at IonRow
    at AdvocateChat (https://localhost:8101/src/components/advocate/AdvocateChat.component.tsx:36:20)
    at ion-content
    at ReactComponent (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23289:7)
    at IonContent
    at div
    at PageManager (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23680:5)
    at IonPageInternal (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23729:5)
    at IonPage
    at AdvocateChatPage (https://localhost:8101/src/pages/advocate/AdvocateChat.page.tsx:93:19)
    at Suspense
    at Route2 (https://localhost:8101/node_modules/.vite/deps/chunk-FYZAQAMR.js?v=594098e6:772:29)
    at ViewLifeCycleManager (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:24553:5)
    at ion-router-outlet
    at ReactComponent (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23289:7)
    at IonRouterOutlet
    at StackManager (https://localhost:8101/node_modules/.vite/deps/@ionic_react-router.js?v=594098e6:225:5)
    at IonRouterOutletContainer (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23838:5)
    at IonRouterOutlet
    at div
    at ion-tabs
    at div
    at PageManager (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23680:5)
    at <anonymous> (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:24066:5)
    at AdvocateTabs (https://localhost:8101/src/routes/AdvocateTabs.router.tsx:32:21)
    at Suspense
    at Route2 (https://localhost:8101/node_modules/.vite/deps/chunk-FYZAQAMR.js?v=594098e6:772:29)
    at PrivateRoute (https://localhost:8101/src/helpers/router.helper.tsx:22:3)
    at Switch2 (https://localhost:8101/node_modules/.vite/deps/chunk-FYZAQAMR.js?v=594098e6:916:29)
    at MiddlewareRouter
    at NavManager (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:24720:5)
    at IonRouterInner (https://localhost:8101/node_modules/.vite/deps/@ionic_react-router.js?v=594098e6:484:5)
    at C2 (https://localhost:8101/node_modules/.vite/deps/chunk-FYZAQAMR.js?v=594098e6:955:37)
    at Router2 (https://localhost:8101/node_modules/.vite/deps/chunk-FYZAQAMR.js?v=594098e6:485:30)
    at IonReactHashRouter (https://localhost:8101/node_modules/.vite/deps/@ionic_react-router.js?v=594098e6:768:5)
    at ion-app
    at ReactComponent (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23289:7)
    at IonApp
    at IonApp (https://localhost:8101/node_modules/.vite/deps/chunk-JXQRAFHQ.js?v=594098e6:23644:5)
    at App (https://localhost:8101/src/App.tsx:52:20)
    at PersistGate2 (https://localhost:8101/node_modules/.vite/deps/redux-persist_integration_react.js?v=594098e6:90:5)
    at Provider (https://localhost:8101/node_modules/.vite/deps/react-redux.js?v=594098e6:1173:3)

@JamesBurnside
Copy link
Member

@DercilioFontes thanks for raising this, looking into it appears to be caused here when the react n* theme provider is unmounted.

We'll work with the folks at fluent to see what the best resolution is

@netscout
Copy link

netscout commented Jun 2, 2023

@DercilioFontes i had similar issue when i set toggle rendering on ACS Components(using &&).
I found workaround to set visibility instead of toggle rendering like this:

style={{
   visibility: chatAdapter ? "visible" : "hidden",
}}

I'm not sure your case is same as mine but i hope this helps 😊

@branegg
Copy link

branegg commented Jul 12, 2023

@JamesBurnside Does 1.6.0 now fully support React 18?

@JamesBurnside
Copy link
Member

JamesBurnside commented Jul 12, 2023

We have bumped the peer deps to unblock react 18 usage in 1.6.0. However, we haven't fixed the strict mode issue above. If you are using react 18 in your application we recommend disabling strict mode (though strict mode doesn't run in production anyway), react 18 should be fully working as expected without strict mode.

@yxor
Copy link

yxor commented Aug 10, 2023

any updates on this? (with strict mode)

@JamesBurnside
Copy link
Member

JamesBurnside commented Sep 8, 2023

any updates on this? (with strict mode)

We are going to remove the dependency (fluent northstar) causing the strict mode issue. This change is non-trivial however, and will take some time to get in. You can track this here #3578.

@dmceachernmsft
Copy link
Member

dmceachernmsft commented Oct 7, 2023

Closing as we released version 1.9.0-beta.1 this includes final support for react 18 as we removed the dep for Fluent Northstar. please check it out! 😊

please reopen the issue if there are more complications with react 18

https://www.npmjs.com/package/@azure/communication-react/v/1.9.0-beta.1?activeTab=versions

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

No branches or pull requests