bright
bright copied to clipboard
Provide a client side version?
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.
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: https://github.com/tom-sherman/react-perfect-syntax-highlighter/pull/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.
+1, this would be great to have