cherifGsoul on document-inserted-removed-can6
Add inserted/removed events to … (compare)
greenkeeper[bot] on can-view-live-5.0.1
fix(package): update can-view-l… (compare)
greenkeeper[bot] on core-js-3.4.8
chore(package): update core-js … (compare)
cherifGsoul on update-infrastructure-page
Update infrastructure page with… (compare)
greenkeeper[bot] on @feathersjs
chore(package): update @feather… (compare)
greenkeeper[bot] on @feathersjs
chore(package): update @feather… (compare)
getKeyValue
shouldn't have to be called after that in order for it to work
../myProp
is the correct way to do it.
const Nils = require('../../')
const defineMap = require('can-define/map/map')
const Component = require('can-component')
const view = require('index.stache')
const app = new Nils()
const viewModel = defineMap.extend({sealed: false},{})
// Init ViewModel
// could be also a defineMap->Stream
app.stream.of({
inputX: '',
inputY: ''
})
// Observe DOM Elements
// return { update, assign }
.combineArray((observed)=>observed,[
app.fromInput(document.querySelector('input.x'))
.map((val)=>{
return { inputX: val }
}),
app.fromInput(document.querySelector('input.y'))
.map((val)=>{
return { inputY: val }
})
])
// Returns the ViewModelUpdating State aka can-x-connect :)
// This can also be a complet Can Component
// its only for demo
.loop(function applyVM(lastSetVal, setVal){
let seed = lastSetVal.viewModel.updateDeep(setVal)
return return { seed, value: seed };
},Component.extend({
tag: 'kasse-login',
ViewModel,
view
}))
// Acticvate the Stream All gets executed as sideEffect
.map((comp)=>comp.render())
.drain()
What is Nils?
Nils is the short form of Nikolaos (Santa Claus) it is composed from the greek words Nike and Laos
Nike = Winner
Laos = Public
= Winner of the Public! It offers DOM Diffing, Streams, Workflows for WebDevelopment