Skip to content

Instantly share code, notes, and snippets.

View mweststrate's full-sized avatar
💭
I may be slow to respond.

Michel Weststrate mweststrate

💭
I may be slow to respond.
View GitHub Profile
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
@mattmccray
mattmccray / observant.js
Last active June 23, 2016 16:19
Port of React Mobservable ObserverMixin to Deku
import mob from 'mobservable'
export default function observant( target ) {
let _unsubscriber = null,
_updateCount = 0,
_render = target.render,
_beforeUnmount = target.beforeUnmount
target.render = ( component, setState ) => {
_unsubscriber && _unsubscriber()
@mattmccray
mattmccray / immobservable.js
Created July 28, 2015 18:27
Immobservable?
import mobservable from 'mobservable/immutable' // Separate module needed?
// Not sure, but basically we need
// to mark it as immutable somehow
let user = mobservable.fromJson({
name: 'Matt',
age: 'NunYoBiznis'
})
user.name //= 'Matt'
import uuid from 'node-uuid'
import {makeReactive} from 'mobservable'
export class NoteStore {
constructor(initialNotes=[]) {
this.notes = makeReactive(initialNotes)
}
addNote({task}) {
this.notes.push({id: uuid.v4(), task})
@teropa
teropa / reactive2015_gol.md
Created September 24, 2015 15:56
ClojureScript Game of Life - Reactive 2015 Lightning Talk Proposal

In my proposed lightning talk for the Reactive Conference, I'll create Conway's Game of Life in ClojureScript, and I'll do it in five minutes. I'll use an interactive programming workflow enabled by Figwheel. Each piece will be added into the running application without reloading the page.

If you want to see a little cellular lifeform spawn out of nothing into an running web browser window, I'd appreciate it if you starred this Gist!

Cheers,

(@teropa)

@hejld
hejld / reactive-2015.md
Last active December 10, 2021 10:24
Advanced React.js Performance - Reactive 2015 Lightning Talk Proposal

Note: This is a submission for a Reactive2015 lightning talk. If you'd like to see a lightning talk about this (or read a detailed blog post if you are not going for the conference), vote for it by starring this gist! Thanks a lot!

Advanced React.js Performance

Performance is one of the reasons why React.js is so popular for building complex, highly interactive web applications. It became the go-to library for developers who don’t like to make compromises for technical reasons when building awesome user experiences. However even with React.js it still can be easy to hit it’s performance limits.

In this lightning talk Daniel will go beyond the basics of shouldComponentUpdate and immutable data structures and will discuss how to correctly instrument, measure and optimize performance in complex React apps. He will help you understand the overhead of different parts of the React component lifecycle, how some of it’

@obenjiro
obenjiro / reactplusmalevich.md
Last active October 6, 2015 19:30
React + MALEVICH ( talk proposal )

#Conference Reactive 2015 ( https://reactive2015.com/ )

#Talk Title: React + MALEVICH

#Speaker: Oleksii Okhrymenko - Lead JavaScript developer

#Summary:

@mrjjwright
mrjjwright / mobservable-vidom.js
Last active January 12, 2016 22:20
Make vidom components reactive using mobservable
(function() {
function mrFactory(mobservable, vidom) {
if (!mobservable)
throw new Error("mobservable-vidom requires the Mobservable package.")
if (!vidom)
throw new Error("mobservable-vidom requires vidom to be available");
var isTracking = false;
// WeakMap<Node, Object>;
@developit
developit / document-shim.js
Last active August 4, 2022 02:27
Minimal stand-in for a full DOM. Mocks out basic DOM 1 node and attribute manipulation.
var document = global.document = createDocument();
export default document;
function createDocument() {
const NODE_TYPES = {
ELEMENT_NODE: 1,
ATTRIBUTE_NODE: 2,
TEXT_NODE: 3,
CDATA_SECTION_NODE: 4,
ENTITY_REFERENCE_NODE: 5,
@javivelasco
javivelasco / reactive-2016.md
Last active January 10, 2023 19:45
Proposal for lightning talk at Reactive Conf 2016

Please star ⭐️ the gist to help! This is a proposal for a ⚡️ talk at Reactive Conference.

Styling Components in React Toolbox 2

I wrote react-toolbox and presented it almost a year ago in lighning talk at Reactive Conf 2015 in Bratislava. At first it was just a proof of concept of a component library styled with CSS Modules and SASS. Now the project has grown quite a bit, and during this year there has been tons of changes and lessons learned.

Theming and customization is one of the most difficult and interesting problems to solve. For the first version we needed a custom Webpack loader to generate themes and doing simple style overrides was very painful. Today I'm working on a new playground that will allow you try CSS Modules live, and to create React Toolbox themes on the f