The app is working and I’m happy with it. In the next version I’m going to add a few new features but I’m thinking about rewriting/refactoring it, because:
I’d like to use the dynamic imports but right now every module is inside the clients folder (according to the original mantra spec) so it’ll be a big change
I want to switch to react-router because I don’t want to sink with flowrouter.
I love mantra-cli and the whole mantra thing was great for me because it forced me to follow a pattern but I’m afraid because it’s abandoned. So I’m thinking about changing to a new HOC pattern/lib.
I’ve tried Redux but it seemed overkill for my project, too much boilerplate. Mantra has boilerplate too but the cli takes care of a lot of things for me (e.g. updating index.js after adding a new module/action/etc).
What would you recommend for me? Stick with mantra just change the file structure (it’s sooo much work without the benefit of leaving an abandoned spec/komposer)? Change to XXX data-loading-container lib/pattern?
How does your client/main.js look like? I’m wondering if importing and loading the modules will cause everything inside them to be added to the bundle.
Or importing the components dynamically in every routes.jsx will solve this?
I am thinking about how to lazy load stuff in the mantra-context as well as how to load whole modules lazyly, but routes is still best way to start loading something lazily.
I haven’t found out yet if this would work with Mantra, but VeliovGroup/flow-router is now providing a way to support Meteor 1.5 dynamic imports in the router:
Our app is React/Material-UI, react-router, and ValidatedMethods. We use Uniforms for forms. We use react-komposer v2 for HOC and react-loadable with Meteor 1.5 dynamic imports to dynamically load views such as our admin code and charts code separately along with some other larger modules. We don’t use Redux. Good luck.
Related question: Anyone has experience about moving from a) FlowRouter to react-router and b) from simple-schema to simple-schema v2 (npm version)? Is it straightforward?
I think I don’t use too many functions from FlowRouter, a couple of FlowRouter.go() and FlowRouter.getRouteName() (apart from the FlowRouter.route()s in routes.jsx files.
I use SimpleSchema's autoValue, DefaultValue, and validator() in ValidatedMethods quite often.