Releases: TheNeuronProject/ef.js
Releases · TheNeuronProject/ef.js
New usage for ef
New usage:
import {create, t} from 'ef.js'
template = create('Your awesome template')
component = new template()
component2 = new t`Your awesome template`
All visible operations cached
v0.2.2-alpha.1 Upgrade version
Full particle update support & render query added
Now attributes and properties can update partially.
Usage:
>div.aaa.{{bbb = class}}.ccc.{{ddd = name}}
#someattr = {{eee = some}} fff {{ggg = value}}
will be rendered as
<div class="aaa class ccc name" someattr="some fff value"></div>
New AST syntax
Old AST syntax is no longer supported.
Modify keys supported
Usage:
@click.alt.shift = submit
Event Options added
Event Options added. Usage:
@keyup.stop.prevent.13 = submit:something
Space indents supported
v0.1.2-alpha.2 Upgrade version
AST syntax change
Minify AST tags to one single character.
Not compatible with old AST.
Mustaches for event handlers added
From now on you can pass value dynamically to a handler using mustaches.
Example:
>div
>input
%value = {{info.message = Type your message here}}
>button
@click = sendMsg:{{info.message}}
.Send!
component.$methods.sendMsg = ({value}) => {
// Code on sending the message
console.log(`Message '${value}' sent!`)
}
Once you click that button, your handler will get the latest value from info.message
Added '$destroy' method
From now on you can release your memory using '$destroy' method on a component if this component is not needed any more