This is a Meteor "Hello, World!" application that applies core concepts described in Mantra specifications version 0.2.0.
- It has a functional stateless UI component called
line. It is rendered with awidththat can be manipulated viagrow,shrinkactions. - the
grow,shrinkactions manipulatewidthstored inLocalState. - A
linecontainer component is composed using the correspondinglineUI component, actions (grow,shrink) and local state (width).
These help to understand core concepts of decoupling UI, actions and "dependency injection". Basically, applications should be using the "composed" component.
To use the composed component:
- The composed line component is exposed via
FlowRouterusing a layout (MainLayout). - Route and actions are exposed as the part of the
coremodule. When the core moduleload(), it sets the initialwidthfor the line component. - The application defines
ReactiveDictasLocalState, among other context data. - As with all mantra based applications,
main.jsloads all the modules (onlycoreModulein this demo).
This repository was created as a result of this issue. Feedback, ideas and corrections appreciated.
To run code linting and tests:
npm test
To continuously watch for file changes and run tests (useful during development, especially TDD):
npm run test-watch
To run code linting:
npm run lint