-
Notifications
You must be signed in to change notification settings - Fork 2
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
Issues regarding integreting the widget to a NextJS project #198
Comments
To use a widget in a NextJS app: Our widgets are using the browser window object that is not accessible on the NextJS server. Therefore, just importing the widgets in a normal way does not work and raises errors on the build. The widgets need to get importet dynamically on runtime. The issue is that dynamic import causes losing the widget input props type. So we need to define the type based on the used props:
Ref: https://nextjs.org/docs/pages/building-your-application/optimizing/lazy-loading |
A GitHub PAT is required to download and install the package, but different scopes can be selected. Add a note for the minimum scope. Related to #198
The TS4NFDI service portal was initiated last week using the NextJS framework. This is the official React documentation recommendation regarding starting a React project (do not use React Lib alone, create-react-app is deprecated): https://react.dev/learn/start-a-new-react-project
I list the issues I faced here so that it can help us to improve the widgets and installation process:
I will add to this list if I find something more.
The text was updated successfully, but these errors were encountered: