Start your All-Access Pass to unlock this challenge
When does the turbo:before-render event fire?
turbo:before-render
It fires every time turbo has to render a page, but before its new contents have arrived via Ajax.
It fires once per session, before Turbo initializes its JavaScript engine.
It fires every time that turbo has to render a page, including new Ajax requests and previews, and before it replaces the <body> element with the new <body> contents.
<body>
It fires every time that turbo has received a new page via Ajax, after it replaces the <body> element but before executing any JavaScript in it.