3 ms·
If you mean avoiding the dreaded loading spinner when loading a single page app, you can add the JSON data in some script within the HTML. This is what server-s
by cyral 4y ago
If you mean avoiding the dreaded loading spinner when loading a single page app, you can add the JSON data in some script within the HTML. This is what server-side rendering frameworks like Next.JS do. In it's simplest form, just include something like:
<script>
window.initialData = {
isLoggedIn: true,
email: 'example@example.com',
todos: [
...
]
}
</script>