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 awidth
that can be manipulated viagrow
,shrink
actions. - the
grow
,shrink
actions manipulatewidth
stored inLocalState
. - A
line
container component is composed using the correspondingline
UI 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
FlowRouter
using a layout (MainLayout
). - Route and actions are exposed as the part of the
core
module. When the core moduleload()
, it sets the initialwidth
for the line component. - The application defines
ReactiveDict
asLocalState
, among other context data. - As with all mantra based applications,
main.js
loads all the modules (onlycoreModule
in 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