Created
September 16, 2017 15:42
-
-
Save dash1291/6a1edf07f2d95974337272208bf28e5d to your computer and use it in GitHub Desktop.
Snippet of async routes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const routes = [ | |
{ | |
path: ‘checkout’, | |
getComponent: (location, callback) => { | |
require.ensure([], (require) => { | |
callback(null, require(‘./Checkout/containers’).default); | |
}, ‘checkout’); | |
}, | |
name: ‘checkout’ | |
} | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment