JavaScript Jabber cover image

Progressive Enhancement with Elliott Johnson - JSJ 591

JavaScript Jabber

00:00

How to Render a Script Component

When you're rendering a spell component, you have your script tag. Your script tag is going to be run from top to bottom on the server. When it gets to the browser, it's then going to hydrate that component. And when it's mounted, it will run that on mount code. But we also have hooks on mount, on destroy, you know, lifecycle hooks. So if I write an on mount hook in my component, when it is run on the server, that on mount hook is not going to be running. Because there's no mount on the server,. You're not actually mounting anything to the DOM. You're just generating a string that's going to

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app