Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 14 20:01
    greenkeeper[bot] labeled #5450
  • Dec 14 20:01
    greenkeeper[bot] opened #5450
  • Dec 14 20:00

    greenkeeper[bot] on semver-7.0.0

    chore(package): update semver t… (compare)

  • Dec 14 16:58
    millette starred canjs/canjs
  • Dec 14 00:14
    greenkeeper[bot] labeled #5449
  • Dec 14 00:14
    greenkeeper[bot] opened #5449
  • Dec 14 00:14

    greenkeeper[bot] on can-super-model-2.0.0

    fix(package): update can-super-… (compare)

  • Dec 14 00:13
    greenkeeper[bot] labeled #5448
  • Dec 14 00:13
    greenkeeper[bot] opened #5448
  • Dec 14 00:13

    greenkeeper[bot] on can-define-rest-model-2.0.0

    fix(package): update can-define… (compare)

  • Dec 14 00:12
    greenkeeper[bot] labeled #5447
  • Dec 14 00:12
    greenkeeper[bot] opened #5447
  • Dec 14 00:12

    greenkeeper[bot] on can-define-realtime-rest-model-2.0.0

    fix(package): update can-define… (compare)

  • Dec 14 00:07
    greenkeeper[bot] labeled #5446
  • Dec 14 00:07
    greenkeeper[bot] opened #5446
  • Dec 14 00:07

    greenkeeper[bot] on can-connect-ndjson-2.0.0

    fix(package): update can-connec… (compare)

  • Dec 13 21:27

    greenkeeper[bot] on @octokit

    (compare)

  • Dec 13 21:25

    greenkeeper[bot] on @octokit

    chore(package): update @octokit… (compare)

  • Dec 13 21:21

    greenkeeper[bot] on @octokit

    (compare)

  • Dec 13 21:20

    greenkeeper[bot] on @octokit

    chore(package): update @octokit… (compare)

Gregg Roemhildt
@roemhildtg
Ohh, I see
Yes that would happen
Gregg Roemhildt
@roemhildtg
I'm not sure how to use can-stache-key, but what if I just add observation.add(obj, key) to the get function from can-util?
wouldn't that trigger the getKeyValue
Brad Momberger
@bmomberger-bitovi
Yeah, if you want to just copy and modify the get function, that should work too
Frank Lemanschik
@frank-dspeed
does somebody in here maybe know the behavier of steal optimized bundels from done-autorender (done-apps)?
the bundels are including the needed code but i think some init stuff is needed that not done automaticly
i think as steal optimize gets the index.stache!done-autorender
it should autorender as expected behavier right?
Chasen Le Hara
@chasenlehara
^ I don’t think we’ve finished making the optimized builds work in a regular DoneJS app, maybe @matthewp can comment though
Matthew Phillips
@matthewp
Optimized builds do not work with done-autorender apps, that is correct.
Going to start working on it soon hopefully.
Nico R.
@nriesco
Hi, I found this in the docs: https://canjs.com/doc/can-validate.html but couldn’t understand how to use it in a form, any ideas?
I was looking for an easy way to support HTML “required” fields
Nico R.
@nriesco
or providing a custom method
swipie
@swipie
We get a lot of warnings about a property that is not in the current scope and that the property is read from the parent scope. It is resolved when we do {{ ../myprop}} instead of {{myprop}} but is this the right way to solve these warnings?
Kevin Phillips
@phillipskevin
Sorry the docs that warning links to haven't been published yet. There are a few ways to resolve this
image.png
Hopefully you can read that. Yes, if you want to read the prop from the parent scope, ../myProp is the correct way to do it.
Kevin Phillips
@phillipskevin
if there are places where you think ../myprop isn't the right way to do it, let us know @swipie
Brad Momberger
@bmomberger-bitovi
Got ninja'd by @phillipskevin, but I was going to add that reading explicitly from the scope level where your prop exists will help ease the upgrade process to future major revisions of can-stache
Frank Lemanschik
@frank-dspeed
lol ninjaed
new term :)
i use normaly outsmartned
Brad Momberger
@bmomberger-bitovi
It's not quite outsmarted, just that someone else got in a correct or agreeing response while you were composing your own.
Frank Lemanschik
@frank-dspeed
ok if you say so
Frank Lemanschik
@frank-dspeed

Streaming can-component

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 do you think about that?
for small components you can even drop can component and directly render stach
Brad Momberger
@bmomberger-bitovi
You named your app for @nlundquist ?
Frank Lemanschik
@frank-dspeed
no thats the name from my son
here you can read about Nils
:D

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
i am at present composing a new framework
that is canjs compatible
as i use canjs as legacy layer for old browsers
:D
i simply take a little stuff from canjs like can-component for compatiblity with browsers that don't support web components
rest ist webcomponent based
and my standart observe able is not can-compute its a stream
the stream is A+
Promise compilant
i also will use steal for easyer development
but a total new ssr technology
here you see a rendered component where i atach the viewModel as soon as JS gets executed
that allows me to return fast simple html