- Read lots of code.
- Write lots of code.
- Don’t be afraid to throw it away.
- Don’t be afraid to share it.
- Find your happy place writing tests.
- You’ll probably spend more time writing tests and debugging than writing code. Embrace this. Make it a key part of your workflow.
- Tests are one of the first things I read in a module. That and the example(s). Probably before API docs.
- Don’t know where to start. Write some tests for a module you like. This benefits everyone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var shell = require('shelljs') | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json') | |
}) | |
grunt.registerTask('default', 'My "default" task description.', function() { | |
grunt.log.writeln('Currently running the "default" task.'); |
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let canvas = window.document.createElementNS("http://www.w3.org/1999/xhtml", "html:canvas"); | |
let context = canvas.getContext("2d"); | |
canvas.width = window.innerWidth; | |
canvas.height = window.innerHeight; | |
context.drawWindow(window, 0, 0, canvas.width, canvas.height, "white"); | |
console.log(` | |
📸 📸 📸 📸 | |
${canvas.toDataURL()} |
OlderNewer