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

Provide a client side version? #19

Open
lucgagan opened this issue Jun 7, 2023 · 2 comments
Open

Provide a client side version? #19

lucgagan opened this issue Jun 7, 2023 · 2 comments

Comments

@lucgagan
Copy link

lucgagan commented Jun 7, 2023

I have a use case where some code examples need to be rendered server-side and others client-side.

It would be nice if I could use the same package for both.

@tom-sherman
Copy link

This should be possible without introducing another component or API, instead of using async/await the component could use(highlight()). That's what I've done in my PR here: tom-sherman/react-perfect-syntax-highlighter#4

(note: I created that library before I knew this one existed lol)

The blocker at the moment is that cache() seems to be unimplemented/experimental on the client. In Next.js at least builds completely fail.

@jzxhuang
Copy link

jzxhuang commented Nov 1, 2023

+1, this would be great to have

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

3 participants