Hang on, I'm not saying flux is dead, or that redux isn't amazing.
Okay ...
Most everybody is familiar with flux by now:
User Interaction --event data-->
Action Creator --action-->
Dispatcher --payload-->
Hang on, I'm not saying flux is dead, or that redux isn't amazing.
Okay ...
Most everybody is familiar with flux by now:
User Interaction --event data-->
Action Creator --action-->
Dispatcher --payload-->
Usage:
To create a new branch that is up-to-date with the remote master:
$ ws 123
Creates the branch issue123
/** | |
* What is it: | |
* Require an image relative to a base image folder and include @2x if it's a retina screen. | |
* Works with webpack and only requires one image path (as opposed to react-retina-image, | |
* which requires specifying both regular and @2x paths). Depends on npm package 'is-retina' | |
* and node's 'path' | |
* Usage: | |
* import requireRetina from './require_retina.js'; // this file | |
* <img src={requireRetina('your_image.png')} /> | |
*/ |
There's an issue with cairo 14.x that results in the axis fonts on the graphs being HUUUUUGE. Downgrading to 12.6 helps:
var React = require('react'); | |
class AutoBindingComponent extends React.Component { | |
constructor(props) { | |
super(props); | |
for (var property in this) { | |
if (this.hasOwnProperty(property) && typeof this[property] === 'function') { | |
this[property] = this[property].bind(this); | |
} |
var active = false; | |
function changeRefer(details) { | |
if (!active) return; | |
for (var i = 0; i < details.requestHeaders.length; ++i) { | |
if (details.requestHeaders[i].name === 'Referer') { | |
details.requestHeaders[i].value = 'http://www.google.com/'; | |
break; | |
} |
// Promise.all is good for executing many promises at once | |
Promise.all([ | |
promise1, | |
promise2 | |
]); | |
// Promise.resolve is good for wrapping synchronous code | |
Promise.resolve().then(function () { | |
if (somethingIsNotRight()) { | |
throw new Error("I will be rejected asynchronously!"); |
/* bling.js */ | |
window.$ = document.querySelector.bind(document); | |
window.$$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
NodeList.prototype.__proto__ = Array.prototype; | |
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
Note: This is the first time we're sharing meeting notes publicly. The primary reason we haven't shared these is because we often mix public discussions with matters that are Facebook specific and should not be public. We're really trying to be more open about our development process and what's happening inside the project so moving forward, we'll be sharing meeting notes. While most of us do work at Facebook, we're committed to this being an open project - for now we'll filter out the private notes from the public notes. Hopefully we can make it possible for these meetings to be open to any who wish to attend.
Attendees:
React makes compositing components easy. However testing them can get ugly if you are not careful. Consider this example:
var ChildA = React.createClass({
displayName: "ChildA",
render: function(){
return (<div>A in the house</div>);
}
});