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 SSR #3703
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
+1 |
1 similar comment
+1 |
@cythrawll can you share what other libraries are like apexcharts but support SSR with frameworks like nuxt3? |
Guys, I think first @apexcharts Please reopen the issue. and Any updates on this @bf @cythrawll. Because I'm using Next13 and I've added
|
+1 |
Would love to get SSR support on apex |
+1 |
Next always renders "use client" on the server too, its just a way to tell Next to ship the JS to the client as well. |
It create problem in Angular side as well, Got this issue 5:59:58 PM [vite] Error when evaluating SSR module /chunk-JAU2AQNA.mjs: |
@apexcharts REOPEN |
As @sannajammeh said, you can use apexcharts in NextJS by importing it like this: import dynamic from "next/dynamic";
const Chart = dynamic(() => import("react-apexcharts"), { ssr: false }); |
any update for Angular Side ?? how to use it ApexChart with SSR ???? really it is very important feature |
I am able to render and build for It's weird because on the route What the hell is going on? |
Summary
SSR is becoming more and more popular way to handle rendering, and having charts that can render both server and client side is really appealing for a number of reasons. While most SSR frameworks allow you to load client only libraries without SSR, apex in theory should be able to be used still client side only. (however in the case of react18s example, react-apexcharts seems to currently be broken as dynamic esm import seems to be broken there is a ticket for that already). However, making libs client side only is kinda a painful work around that isn't apparent when first using the library as docs don't mention anything about this gotcha.
API Changes
Make apex SSR friendly.
Intended Use Case
Better DX and UX when using apex charts in SSR frameworks like NEXT and Remix. Taking advantage of SSR frameworks caching and time to first render as well as other server side rendering benefits. I love using Apex, but this is probably going to cause me to abandon this in favor of other libraries.
The text was updated successfully, but these errors were encountered: