As a Mantra newbie myself, I have recently acquired some helpful tips for getting started with Mantra, thanks to great advice from many here and on the Github Mantra issues board.
Do not pass go, do not collect $200, go directly to Mantra CLI and use it to construct the directory structure and initial code of your Mantra app. This can save you about a week if you are a total Mantra newbie like me.
Data is passed from Container to Component via the composer function. Example:
I hope this is helpful. If I have gotten anything wrong, I hope others here will correct the error. And of course if anyone has additional tips for Mantra newbies, this might be a possible thread in which to post them.
Here’s a couple of new tips I’ve noticed in the past week. These are extreme newbie tips. At the same time of course, many people coming to Meteor/Mantra for the first time might find them helpful.
If you download code to a Meteor sample app, in many cases the terminal command npm install will identify and download all npm package dependencies needed by the app.
It’s been a few weeks and I now am successfully accessing most of Mantra:
Containers
Components
Collections, both reading from and writing to
Actions
Publications
Methods
I guess the most important thing I’ve learned so far is:
Don’t merely use mantra-cli from time to time to create a component or container here or there. Use mantra-cli to create your initial empty application folder, and use it every time you add a component, container, action, etc. This will save you an enormous amount of time, as it can be very tricky figuring out all the many things Mantra/React needs to have set up, in order to launch any part of the app.