I hereby claim:
- I am markthethomas on github.
- I am markthomas (https://keybase.io/markthomas) on keybase.
- I have a public key ASBX7E3tfj4Dkt9PCb69PcqOKiemYrdB4q_yRyi4QaNMywo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<div id="root"> | |
<!-- This div's content will be managed by React. --> | |
</div> |
import React, { Component } from 'react'; | |
import { Text, View, StyleSheet } from 'react-native'; | |
export default class WhyReactNativeIsSoGreat extends Component { | |
render() { | |
return ( | |
<View> | |
<Text> | |
If you like React on the web, you'll like React Native. | |
</Text> |
'use strict'; | |
const React = require('react-native'); | |
const { | |
AppRegistry, | |
StyleSheet, | |
Text, | |
Image, | |
View, | |
} = React; |
'use strict'; | |
const React = require('react-native'); | |
// We need to include the Image component type so we can use it | |
const { | |
AppRegistry, | |
StyleSheet, | |
Text, | |
Image, |
'use strict'; | |
const React = require('react-native'); | |
let { | |
AppRegistry, | |
StyleSheet, | |
Text, | |
View, | |
Image, | |
} = React; |
{ | |
"global": { | |
"devDependencies": { | |
"babel": "^6.0.14", | |
"eslint": "^1.8.0", | |
"mocha": "^2.3.3", | |
"pm2": "^0.15.8", | |
"bluebird": "^3.0.5" | |
}, | |
"dependencies": { |
function count(array) { | |
return array.reduce((accumulator, current) => { | |
accumulator[current] = ++accumulator[current] || 1; | |
return accumulator; | |
}, {}); | |
} | |
// Explanation: takes in an array and iterates over it with the reduce function. A callback is fired on each | |
// item in the array, with an accumulator and current value as args. The key thing is seeing that the default value of | |
// the accumulator is set to an object that we can write to ({}). Then, as we iterate through the values, |
#using debian:jessie for it's smaller size over ubuntu | |
FROM debian:jessie | |
# Replace shell with bash so we can source files | |
RUN rm /bin/sh && ln -s /bin/bash /bin/sh | |
# Set environment variables | |
ENV appDir /var/www/app/current | |
# Run updates and install deps |
'use strict'; | |
require('babel/register'); | |
var ourModule = require('./example'), | |
chalk = require('chalk'); | |
ourModule('Mark', function(err, message) { | |
if (err) { | |
console.error(err); |