*Define some of the json fragments in the view object that are highly similar and frequently used as template components. When using this, the amount of code in the view object can be effectively reduced. See the example below.*
```javascript
import { registerTemplate } from 'maka'
const CustomTemplate = function(props) {
return {
component: 'div',
children: [{
component: 'div',
children: props.content
},{
component: 'div',
children: props.content
}
]
}
}
registerTemplate( 'CustomTemplate', customTemplate)
const view = {
component: 'CustomTemplate',
content: 'hello'
}
```
- Introduction
- What is maka?
- Installation
- Getting Started
- Command Line Tool
- Main concepts
- State
- Action
- View
- Advanced concepts
- Expression
- View reserved keywords
- Custom components
- Custom template components
- ActionMixin
- App && Hub
- App
- Hub
- Maka API
- Maka Api
- Ajax && Mock
- Ajax
- Mock
- Navigate
- navigate
- Team
- Our Team
- Done