You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently working on adding copy link buttons to all headers (just like github does it) The way I have it set up would be perfect, but I'm using sveltekit for my app, and the SSR > Hydration > CSR process completely breaks the heading links, since bind:this doesn't run during SSR.
For reference, here's the current h1 component:
The main issue is that on page load, the heading doesn't have an id, since the ids are generated after the component is bound. There are many issues with this besides links not working. Running this during CSR could easily cause lag spikes during page load if there are enough headers on a page. (Unlikely, but still.) I'm completely at a loss to be honest with you. The only thing I can think of that could maybe fix this is creating custom preprocessor. Any ideas?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm currently working on adding copy link buttons to all headers (just like github does it) The way I have it set up would be perfect, but I'm using sveltekit for my app, and the SSR > Hydration > CSR process completely breaks the heading links, since
bind:this
doesn't run during SSR.For reference, here's the current
h1
component:The main issue is that on page load, the heading doesn't have an id, since the ids are generated after the component is bound. There are many issues with this besides links not working. Running this during CSR could easily cause lag spikes during page load if there are enough headers on a page. (Unlikely, but still.) I'm completely at a loss to be honest with you. The only thing I can think of that could maybe fix this is creating custom preprocessor. Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions