Open MarkLyck opened 3 years ago
I'm setting up a dead simple page using Charge (love it btw.)
It's just a page telling the user they are blocked. But I need to display the URL that they are trying to access.
Normally I'd just use window.location for this. But when it's rendered server side there is no window.
window.location
And since no React is ever run in the browser, it never runs my line of JavaScript.
I tried creating another js file and importing it hoping it would get served with the HTML. But no :(
How do I serve a simple piece of JavaScript in the browser with Charge?
I'm even okay if it means adding a script tag to the React code, but that doesn't seem to work either :(
I'm setting up a dead simple page using Charge (love it btw.)
It's just a page telling the user they are blocked. But I need to display the URL that they are trying to access.
Normally I'd just use
window.location
for this. But when it's rendered server side there is no window.And since no React is ever run in the browser, it never runs my line of JavaScript.
I tried creating another js file and importing it hoping it would get served with the HTML. But no :(
How do I serve a simple piece of JavaScript in the browser with Charge?
I'm even okay if it means adding a script tag to the React code, but that doesn't seem to work either :(