Real unit test (isolation, no children render)
Calls:
- constructor
- render
Run each of the following lines, replacing yourdomain.com
and codehere
with your details:
now dns add yourdomain.com @ TXT google-site-verification=codehere
now dns add yourdomain.com @ MX ASPMX.L.GOOGLE.COM 1
now dns add yourdomain.com @ MX ALT1.ASPMX.L.GOOGLE.COM 5
now dns add yourdomain.com @ MX ALT2.ASPMX.L.GOOGLE.COM 5
now dns add yourdomain.com @ MX ALT3.ASPMX.L.GOOGLE.COM 10
now dns add yourdomain.com @ MX ALT4.ASPMX.L.GOOGLE.COM 10
// How to ensure that our animation loop ends on component unount | |
componentDidMount() { | |
this.startLoop(); | |
} | |
componentWillUnmount() { | |
this.stopLoop(); | |
} |
React Fiber is an ongoing reimplementation of React's core algorithm. It is the culmination of over two years of research by the React team.
This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :
Firstly install Brew on your MAC
Then install PHP
// Edit from http://blog.vjeux.com/2013/javascript/scroll-position-with-react.html | |
componentDidMount() { | |
const node = ReactDOM.findDOMNode(this); | |
node.scrollTop = node.scrollHeight; | |
} | |
componentWillUpdate: function() { | |
const node = this.getDOMNode(); | |
this.shouldScrollBottom = node.scrollTop + node.offsetHeight === node.scrollHeight; | |
}, |
//Some of the examples use spread syntax available via Babel in ES7 proposal. | |
//Live at: https://jsbin.com/zawavekepo/edit?js,console | |
//Arrays, slicing and avoiding mutations | |
const numArray = [10, 20, 30, 40, 50, 60]; | |
const removeAtIndex = (arr, x) => { | |
return [ | |
...arr.slice(0, x), | |
...arr.slice(x + 1) | |
]; |