What's New in DativeJs
DativeJs has released a new version recently v2-alpha.1
What does it bring
DativeJs has added new feautures like
- animations
- helpers
Some global methods has been deprecated like
-
Dative.importstyle(href: string)
use the normal<link>
now -
Dative.use(plugin, ...opts)
useapp.use
Some options has been deprecated,changed
-
update
has been deprecated -
mounted
has been changed toonmounted
-
created
has been changed tooncreated
New Options has added
-
animate
for defining animations -
use
for installing a plugin -
property
for creating a local property -
attach
for attaching a Dative Component/Instance to another Dative Instance
New Global Methods added
-
defineApp
This is a shorter way of creating a dative instance. No Need Fornew
keyword with the defineApp methods
import { defineApp } from 'dativejs'
var app = defineApp({
el: "#app" // or a css selector or a tag
})
-
defineProperty
It's used to create property in DativeJs see defineProperty in DativeJs Docs
import { defineProperty } from 'dativejs'
defineProperty('foo',()=>{
return 'bar'
})
-
extend
It's used to extend Dative Instance in DativeJs see extend in DativeJs Docs
import Dative from 'dativejs'
export let SideBar = Dative.extend({
// same options with the dative option but no el options
})
// index.js
import { SideBar } from './sidebar.dative.js'
new SideBar({
el: "#sidebar"
})
The new way of installing a plugin in Dative.Js is quiet more easy
Top comments (0)