How to use the snabbdom/snabbdom.js.init function in snabbdom

To help you get started, we’ve selected a few snabbdom examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github FractalBlocks / Fractal.js / examples / DragAndDrop / app.js View on Github external
const R = require('ramda')
const h = require('snabbdom/h')
const patch = require('snabbdom/snabbdom.js').init([
  require('snabbdom/modules/class'),
  require('snabbdom/modules/style'),
  require('snabbdom/modules/props'),
  require('snabbdom/modules/eventlisteners'),
])
const F = require('../../lib')

let {blocks} = require('./modulos')

let blocksM = blocks('blocks')


// TODO: update this example, take things from WindowListener task example

module.exports = F.def({
  init: ({key}) => ({
github paldepind / functional-frontend-architecture / examples / modal / js / app.js View on Github external
/* jshint esnext: true */
const R = require('ramda');
const flyd = require('flyd');
const stream = flyd.stream;
const forwardTo = require('flyd-forwardto');
const Type = require('union-type');
const patch = require('snabbdom/snabbdom.js').init([
  require('snabbdom/modules/class'),
  require('snabbdom/modules/style'),
  require('snabbdom/modules/props'),
  require('snabbdom/modules/eventlisteners'),
]);
const h = require('snabbdom/h')

const Modal = require('./modal')

// Model

const init = () => ({
  modalOpen: false,
});

// Actions