Hi! :wave: Any chance you have tested `sdk-ui` und...
# gooddata-ui
t
Hi! 👋 Any chance you have tested
sdk-ui
under React’s strict mode? I’ve tried the Dashboard component from
@gooddata/sdk-ui-dashboard
and it fails to function as it is stuck in the loading state. It’s a pitty having to turn off strict mode for the project, because of GD components, but more importantly, it indicates some issues in your code, like unexpected side-effects or issues with component state management. Thanks!
j
Could you share a bit more under which circumstances the dashboard component fails to load? I’ve created an app for myself using the Accelerator toolkit and have enabled strict mode over the dashboard component (and over the entire app after). The component still loaded as expected. If possible, a code snippet containing what you’re doing would help.
i
Could you provide some error log? We can look at this closer.
t
Just trying to investigate right now. I’ve tried on GD sample CRA project and it works there, so there’s something more specific about my circumstance, I guess. I’ll see if I can find out what it is and report back 🙂 Thanks
i
We were hit by similar problem in next version caused by wrong typescript in reselect library i guess ... so if you will provide us more info it will be fine thx.
t
Ah I think I know what it is. I’m using React 18
🔧 1
This warning is coming up:
ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17
- from somewhere in InsightRendererCore
i
Oh ... ok ... it will no work ... React 18 is on our route map for version 9.0.0 (currently working on it in team)
j
Ah, that explains it 🙂
t
Great! When can we expect that to be released roughly? Or when would you have a build to test? 🙂
i
Next release will be 8.12 (next week) it should contains css fix you ask in different thread (hope it will help) ... and after that we will release version 9 where main topic is react18 ... i do not have exact date now but all elves in team working on it
🙌 1
🧝‍♂️ 1
t
Thanks for the info and thank you for already looking at the css issues I reported. Much appreciated. If you need my input or if I can test the css fix before the release, let me know.
There’s another small thing that I found out. There’s this code in Overlay in sdk-ui-kit:
Copy code
var events = [
    { name: "click", handler: "closeOnOutsideClick", target: document },
    ....
];
The issue is, that since this is at the top level of the file, if you’re doing SSR, it will crash your server, because
document
doesn’t exist. It is OK to refer to
document
in component or in functions called during component render, because if component render fails on the server, React will go ahead and just render the suspense and re-render the component on the client. I personally don’t mind, because I load the GD components using React.lazy and keep a separate bundle, but maybe someone playing around with Next.js and GD might run into this.