Skip to content

Instantly share code, notes, and snippets.

@siassaj
siassaj / snabbdom-asnyc.js
Last active June 28, 2019 05:50
trying to understand how to use snabbdom when dealing with asynchronous events (inlining an svg)
import { h, init } from 'snabbdom';
import classModule from 'snabbdom/modules/class';
import propsModule from 'snabbdom/modules/props';
import styleModule from 'snabbdom/modules/style';
import eventModule from 'snabbdom/modules/eventlisteners';
// Init patch function with chosen modules
const patch = init([
classModule, // makes it easy to toggle classes
config.paperclip_defaults = {
:storage => :s3,
:url => ":s3_domain_url"
:s3_host_name => "s3.amazonaws.com",
:s3_credentials => {
:bucket => 'healthyhabitsutah',
:access_key_id => ENV['AWS_KEY'],
:secret_access_key => ENV['AWS_SECRET']
}
}