Skip to content

Instantly share code, notes, and snippets.

View krisaoe's full-sized avatar
:octocat:

krisaoe krisaoe

:octocat:
  • Tidetech
  • Tasmania, Australia
View GitHub Profile
@krisaoe
krisaoe / README.md
Created April 7, 2019 00:05 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@krisaoe
krisaoe / 0-Simple counter: different implementations...
Created February 25, 2017 14:35 — forked from srdjan/100+ different counter apps...
Simple counter: different implementations...
different implementations of the simple counter app... code verbosity vs expressiveness
@krisaoe
krisaoe / README.md
Created January 22, 2017 15:51 — forked from Dr-Nikson/README.md
Auth example (react + redux + react-router)
@krisaoe
krisaoe / react-terminology.md
Created January 22, 2017 15:51 — forked from sebmarkbage/react-terminology.md
React (Virtual) DOM Terminology
@krisaoe
krisaoe / README.md
Created January 22, 2017 15:49 — forked from joshdover/README.md
Idiomatic React Testing Patterns

Idiomatic React Testing Patterns

Testing React components seems simple at first. Then you need to test something that isn't a pure interaction and things seem to break down. These 4 patterns should help you write readable, flexible tests for the type of component you are testing.

Setup

I recommend doing all setup in the most functional way possible. If you can avoid it, don't set variables in a beforeEach. This will help ensure tests are isolated and make things a bit easier to reason about. I use a pattern that gives great defaults for each test example but allows every example to override props when needed:

@krisaoe
krisaoe / index.md
Created January 22, 2017 15:49 — forked from alekseykulikov/index.md
SUIT CSS naming convention for React.js application

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

@krisaoe
krisaoe / comparison.md
Created January 22, 2017 15:37 — forked from makmanalp/comparison.md
Angular vs Backbone vs React vs Ember notes

Note: these are pretty rough notes I made for my team on the fly as I was reading through some pages. Some could be mildly inaccurate but hopefully not terribly so. I might resort to convenient fiction & simplification sometimes.

My top contenders, mostly based on popularity / community etc:

  • Angular
  • Backbone
  • React
  • Ember

Mostly about MVC (or derivatives, MVP / MVVM).

var Col = require('react-bootstrap/lib/Col')
var PageHeader = require('react-bootstrap/lib/PageHeader')
var React = require('react')
var Row = require('react-bootstrap/lib/Row')
var {connect} = require('react-redux')
var {reduxForm} = require('redux-form')
var DateInput = require('./DateInput')
var FormField = require('./FormField')
var LoadingButton = require('./LoadingButton')
@krisaoe
krisaoe / introrx.md
Created January 22, 2017 15:37 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@krisaoe
krisaoe / frontendDevlopmentBookmarks.md
Created January 22, 2017 15:36 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.