Skip to content

Instantly share code, notes, and snippets.

:shipit:
There's no place like 127.0.0.1

Yüg eugeniosegala

:shipit:
There's no place like 127.0.0.1
Block or report user

Report or block eugeniosegala

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View lazy.js
import React, { Component, Suspense } from 'react';
const Prodotti = React.lazy(() => import('./containers/Prodotti'));
View suspense-inline.js
{this.state.prodotti &&
<Suspense fallback={<div>Caricamento...</div>}>
<Prodotti/>
</Suspense>
}
View suspense.js
<Route
path="/prodotti"
render={() => (
<Suspense fallback={<div>Caricamento...</div>}>
<Prodotti />
</Suspense>
)}
/>
View async-component.js
// Async Component from Maximilian Schwarzmüller
import React, { Component } from 'react';
const asyncComponent = (importComponent) => {
return class extends Component {
state = {
component: null,
};
You can’t perform that action at this time.