Comments (2)
@bguiz here is your mistake:
reactSnapshotRender(, document.getElementById('root'));
You have bootstrapped some App
and then rendered the completely fresh new <App />
instead.
it should be:
const App = <App />;
asyncBootstrapper(App).then(() => {
reactSnapshotRender(App, document.getElementById('root'));
registerServiceWorker();
});
from react-async-bootstrapper.
same happening here.
in src/index.js
:
asyncBootstrapper(App).then(() => {
reactSnapshotRender(<App />, document.getElementById('root'));
registerServiceWorker();
});
in src/Page.js
class Page extends Component {
asyncBootstrap() {
console.log('Page.asyncBootstrap');
}
The console.log statement never gets printed.
The hierarchy is:
App -> Router -> div -> Switch -> Route -> Page
(using create-react-app
with:
"react": "^15.6.1",
"react-async-bootstrapper": "^1.1.1",
"react-router-dom": "^4.1.1",
)
from react-async-bootstrapper.
Related Issues (11)
- Adjust API so that anything but a `false` will continue tree traversal HOT 2
- in material-ui v1.0 has some wrong
- example with react-router-dom HOT 1
- When using this library, use axios to make requests in the bootstrap() method of the component. If the url is a full full path, you can request it. If you use node to forward, you can't ask.
- Bootstrap not passing proper context on SSR HOT 5
- Cannot read property 'dense' of undefined in development env HOT 1
- can not use dynamic import
- The application calls render twice using react-async-bootstrapper HOT 8
- SSR does not work correctly after upgrading to 2.0.0 HOT 3
- Renamed asyncBootsrap to bootstrap for v2 but still see warning HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-async-bootstrapper.