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

ReactQuill, NextJS and SSR #1000

Open
alilland opened this issue Sep 6, 2024 · 0 comments
Open

ReactQuill, NextJS and SSR #1000

alilland opened this issue Sep 6, 2024 · 0 comments

Comments

@alilland
Copy link

alilland commented Sep 6, 2024

This isnt a new topic, I can see the solution others have done to implement ReactQuill together with NextJS, however my issue is a little more nuanced.

I use ReactQuill to not only write blogs but I use it to display them as well (unless there is a better solution to display delta's)

In my server side NextJS page I import my component housing 'react-quill' using dynamic import

const TextEditor = dynamic(() => import('@/components/inputs/TextEditor'), { ssr: false })

The problem with this is I lose the benefit of SSR almost entirely, the reason for SSR is for caching articles. Not all search engines are good at rendering Javascript. I also get lower get lower ranking points with "First to Paint" being slower now because the article is rendered on the client side.

is there a way to "spoof" document on server side and trick it into rendering HTML components on the server side? Or is there an alternative rendering library I can use for rendering my stored JSON delta structure? { ops: [...] }

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

No branches or pull requests

1 participant