code-hike / codehike

Marvellous code walkthroughs
https://codehike.org
MIT License
4.39k stars 135 forks source link

Issue when using codehike within a <Transition/> from headlessui #319

Closed DanBloy closed 1 year ago

DanBloy commented 1 year ago

Hi All,

I have been using codehike on a website with great success. This is a blog type feature where each page is an .mdx and the code snippets load correctly.

I'm want to use codehike within a slide out component as part of a help file system. This works fine locally. However when i push to Vercel the code snippets are not visible. If i resize the window then they become visible.

I've replicated the issue here:

https://stackblitz.com/edit/github-dpfg51?file=pages/codehike.mdx

Replicate the issue

  1. load the sample above
  2. Press the button to open the slider
  3. Resize the window

Bug or my failed usage? Any help appreciated.

Thx Dan

pomber commented 1 year ago

maybe related to #279

I need to take a look, but maybe one workaround is to make the component re-render (changing the key of one of the parents for example) when the visibility changes.