First, an exercise. Can we represent all of css with plain data? Let's try.
let redText = { color: 'red' };
import React from 'react'; | |
const ConditionalWrap = ({condition, wrap, children}) => condition ? wrap(children) : children; | |
const Header = ({shouldLinkToHome}) => ( | |
<div> | |
<ConditionalWrap | |
condition={shouldLinkToHome} | |
wrap={children => <a href="/">{children}</a>} | |
> |
#!/usr/bin/env bash | |
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done | |
git fetch --all | |
git pull --all |
require('isomorphic-fetch'); | |
fetch('https://1jzxrj179.lp.gql.zone/graphql', { | |
method: 'POST', | |
headers: { 'Content-Type': 'application/json' }, | |
body: JSON.stringify({ query: '{ posts { title } }' }), | |
}) | |
.then(res => res.json()) | |
.then(res => console.log(res.data)); |
I made a little styling lib called glam
(some features are in development)
let's start off with the simplest use case. we'll make an 'index.html' page,
and assume we've setup our js bundler to output bundle.js
-import { Text, View, ListView } from 'react-native'; | |
+import { Text, View, FlatList } from 'react-native'; | |
import style from './styles'; | |
import listData from './listData'; | |
class App extends Component { | |
- constructor(props) { | |
- super(props); |
'use strict' | |
const AWS = require('aws-sdk'); | |
var MongoClient = require('mongodb').MongoClient; | |
let atlas_connection_uri; | |
exports.handler = (event, context, callback) => { | |
var uri = process.env['MONGODB_ATLAS_CLUSTER_URI']; | |
if (atlas_connection_uri != null) { |
subprojects { | |
ext { | |
compileSdk = 25 | |
buildTools = "25.0.1" | |
minSdk = 19 | |
targetSdk = 25 | |
} | |
afterEvaluate { project -> | |
if (!project.name.equalsIgnoreCase("app") |
<!-- 🖼 Photo Library --> | |
<key>NSPhotoLibraryUsageDescription</key> | |
<string><Your description goes here></string> | |
<!-- 📷 Camera --> | |
<key>NSCameraUsageDescription</key> | |
<string><Your description goes here></string> | |
<!-- 🎤 Microphone --> | |
<key>NSMicrophoneUsageDescription</key> |