Raw Html Flash between route change
See original GitHub issueReact-static version 4.8.3 React version 16.0.0
The result is running the actual final build with npm run build
. not npm start
as it will load the dev environment loader.
Between transition of route, I experiencing this flash of raw html… What is the cause? Is there a solution? Any hint?
NOTE: I used the styled-component example as the base code, because all my styling is load through styled-components.
in the example, I switch from /about
route to /contact
route. and below shows what happened.
static-config.js
import axios from 'axios'
import {content} from 'content';
export default {
getSiteProps: () => ({
siteTitle: content.site.siteName.casual,
}),
siteRoot: 'http://site.com',
getRoutes: async () => {
return [
{
path: '/',
component: 'src/containers/BlogListingPage',
},
{
path: '/about',
component: 'src/containers/AboutPage',
},
{
path: '/contact',
component: 'src/containers/ContactPage',
},
{
path: '/blogs',
component: 'src/containers/BlogPage',
getProps: () => ({
blogs: content.blogs,
}),
children: [
{
path: '/all',
component: 'src/containers/BlogListingPage',
},
...content.blogs.map(blog => ({
path: `/detail/${blog.route.name}`,
component: 'src/containers/BlogPage',
getProps: () => ({
blogRef: blog.route.name,
blog: blog,
}),
}))
],
},
]
},
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Raw Html Flash between route change · Issue #298 - GitHub
Between transition of route, I experiencing this flash of raw html... What is the cause? Is there a solution? Any hint?
Read more >Building a Router with Raw React - James K Nelson
Routing means doing something in response to a change in the browser's current URL. There are two ways you can accomplish this: pushState ......
Read more >Why is Html.Raw escaping ampersand in anchor tag in ASP ...
This is happening because something in the pipeline (I'd guess razor but I'd need to look it up) attribute encodes all attribute values....
Read more >ESP32 Web Server using SPIFFS (SPI Flash File System)
In this In this tutorial we'll show you how to build a web server that serves HTML and CSS files stored on the...
Read more >HTML and CSS Tutorial - Nanyang Technological University
Basic HTML and CSS Tutorial for the beginners.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yep On Wed, Jan 17, 2018 at 10:55 AM Adam Chen Wei notifications@github.com wrote:
That maybe the reason… gotcha. so if I loading page correctly with Link, I guess I shouldn’t be experiencing the naked html?