- Getting Started
- Concepts
yarn add zefir react react-dom mobx mobx-react
./node_modules/zefir/dist/bin/zefir init
- zefir dev - run your project in dev mode. Accessible via http://localhost:3000
- zefir build - create production ready build
- zefir start - serve your build
- zefir init - bootstrap project structure
Connected Component is component infused with zefir magic:
- has access to stores, services & router
- observe stores for changes and rerender only when needed
- handles
init
property as place for side-effects and actions - with
form
property you can easily build your form fields - it can become stateful component with
actions
,events
andstate
properties
To connect component, use connect
function:
import {connect} from 'zefir/utils'
const Hello = ({router}) => (
<div>World. Location: {router.route.match.href}</div>
)
export default connect(Hello)