I'd like to specify some special properties for my routes, namely: asyncLoad= true/false, pregenerate static html: true/false and some other.
For this, I'd like to create own createRoutes script, which would look very simmilar to classical react-router definition, but would loop through routes and return the classical react-router createRoutes file. Do you have any ideas/resources how to do that? Thank you.
Copyright Notice:Content Author:「user3696212」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/40901256/react-router-create-routes-from-higher-order-component