Introduction
DativeJs Is A Mordern Ui Javascript FrameWork
How Do I Use Dative.Js
First
Scaffold A Project
$ npx degit dativeJs/template my-app
# Install All The Dependencies
$ npm i
That Command Should Create a template with Dative.JS There
File Structure Should Be Considered While Creating a New Component
my-app
|- src
|- your-component
|- your-component.dative.html // The Template
|- your-component.dative.js // The Script
// your-component.dative.js
import Dative from 'dativejs';
import template from './your-component.dative.html';
export let YourComponent = Dative.extend({
template,
// Other Options Goes Here
})
Then You Can Import it in the src/index.js
import { YourComponent } from './your-component/your-component.dative'
...
app.attach([
...,
new YourComponent({
el: '#your-component-id'
})
])
You Set
Check DativeJS Docs for more details
Thanks For Reading :)
Top comments (0)