-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Closed
Description
The new version of next inlines NEXT_DATA and downloads app.js in production.
This is really nice that it is deferred and the page is usable.
The problem that I have ran into is that I have a few basic things that I need available before app.js downloads.
Is there a way to "escalate" JS code to be rendered earlier, preferably inline?
Example -
Menu Button on mobile requires JS to open.
Menu is not clickable until app.js is downloaded.
Question -
What are the ways others have solved this problem?
Concerns -
Can't use <HEAD> because that is performance negative, and is before any dom elements have been mounted. Can't get access to traditional react states, like componentDidMount.
Metadata
Metadata
Assignees
Labels
No labels