Skip to content

Instantly share code, notes, and snippets.

Avatar

Dan Wilt dwilt

  • 64 Interactive, LLC
  • Hellertown, PA
View GitHub Profile
@dwilt
dwilt / NativeAxis Gist
Created Oct 27, 2016
Gist to show off I'm not a total noob at ES6
View NativeAxis Gist
// 22: class - creation
// To do: make all tests pass, leave the assert lines unchanged!
describe('class creation', () => {
it('is as simple as `class XXX {}`', function() {
class TestClass {}
const instance = new TestClass();
assert.equal(typeof instance, 'object');
View badImport.js
export const functionToImport = () => {
// I had an old reference to a class method that was in this file previously
// React never consold an error but I saw the warning `Did not expect componentDidMount timer to start while render timer is still in progress for another instance`
// luckily I had few very changes in my working directory, so I didn't spend too much time trying to find the culprit
var x = this.something();
return x;
}