This repository was archived by the owner on Aug 5, 2020. It is now read-only.
Description
Upgrade react-router to version 4 Upgrade React Router from version 3 to 4 #1072
function getRoutes ( store , httpClient ) {
return [
{
component : MasterLayout ,
routes : [
{
path : '/' ,
exact : true ,
component : withDataLoader ( {
async onEnter ( match , request ) { /* ... */ } ,
shouldReloadData ( ) { return true ; } ,
Loading : Spinner
onError ( error ) { /* handle error */ }
/* ... */
} ) ( HomeApp )
} ,
] ,
} ,
] ;
}
Unify configuration
module . exports = [
{
name : 'main' ,
path : '/' ,
Document : './apps/main/Index.js' ,
reducers : . '/apps/main/reducers' ,
routes : './apps/main/routes' ,
config : { /* .... */ } ,
} ,
{
name : 'test' ,
path : '/test' ,
Document : './apps/test/Index.js' ,
reducers : './apps/test/reducers' ,
routes : './apps/test/routes' ,
} ,
] ;
Revamp plugin system and concat it with hooks
class MyPlugin {
constructor ( /* initial data + helpers/utils */ ) { /* ... one-time setup */ }
exampleHook ( /* args */ ) { } ,
async exampleHook2 ( /* args */ ) { }
}
// or
function MyPlugin ( /* initial data + helpers/utils */ ) {
/* ... one-time setup */
return {
exampleHook ( /* args */ ) { } ,
async exampleHook2 ( /* args */ ) { }
}
}
modularize commands - each command will have it's own lifecycle:
module . exports = {
setup ( commander ) {
// define itself
} ,
run ( ) {
// do sth
}
// ...
} ;
This will allows us to support more advanced scenarious where we need to alter the command
behaviour + commands plugins
guides and full documentation
presets Project presets #992
updates to default project template
...
Reactions are currently unavailable
react-routerto version 4 Upgrade React Router from version 3 to 4 #1072gsBeforeRoutestoonEnteronEnterand await the results on server, but on client navigate and call other hookswithDataLoaderoptionssrc/entries.jsonwithsrc/apps.jsand use an array instead of object (Improve client and server entires with unified configuration #1078):behaviour + commands plugins