This file contains 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
import { LayoutAnimation, Keyboard, Platform } from 'react-native'; | |
export default class KeyboardEventListener { | |
static subscribe(callback) { | |
const listener = new KeyboardEventListener(callback); | |
return () => { | |
listener.unsubscribe(); | |
}; | |
} |
This file contains 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
import _ from 'lodash'; | |
import parseCustomDateString from '../util/parseCustomDateString'; | |
const response = { | |
data: { | |
events: [ | |
{ | |
schedule: [ | |
{ | |
description: "With the advent of libraries like React, Redux and Immutable.js, it's clear that there's a shift away from imperative and object-oriented in the front-end towards a more declarative and functional approach. Meanwhile, libraries like RxJS and Mobx are spreading the use of Reactive Programming to model UIs via discrete, asynchronous event streams. How can we combine the best of both functional and reactive paradigms to model and build predictable UIs that control themselves?\n\nIn this talk, Preethi will explain what “Functional Reactive Programming” is, how close React / Redux / Mobx / RxJs and others come in realizing Functional Reactive Programming, and what's still fundamentally missing from these tools to achieve a true implementation of FRP. Lastly, she'll describe when and why FRP is suitable (or not suita |
This file contains 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
import React from 'react'; | |
import { TextInput, View } from 'react-native'; | |
// Try it: https://snack.expo.io/ByW4CFPx- | |
export default class GrowingTextInput extends React.Component { | |
static defaultProps = { | |
minHeight: 30, | |
}; | |
constructor(props, context) { |
This file contains 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
module.exports = ({ url, iosManifest, config }) => { | |
const { webhookUrl } = config; | |
const slack = require('slack-notify')(webhookUrl); | |
return new Promise((resolve, reject) => { | |
slack.send( | |
{ | |
icon_url: iosManifest.iconUrl, | |
text: `${iosManifest.name} v${iosManifest.version} published to ${url}`, | |
unfurl_links: 0, |
This file contains 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
{ | |
"hooks": { | |
"postPublish": [ | |
{ | |
"file": "./notify", | |
"config": { | |
"webhookUrl": "https://hooks.slack.com/put-your-stuff-here" | |
} | |
} | |
] |
This file contains 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
{ | |
"description": "Other exp.json fields go here, removed to make it easy to read.", | |
"hooks": { | |
"postPublish": [ | |
{ | |
"file": "expo-postpublish-slack-notify", | |
"config": { | |
"webhookUrl": "https://hooks.slack.com/put-your-stuff-here" | |
} | |
} |
This file contains 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
module.exports = ({ url, iosManifest, config }) => { | |
const { webhookUrl } = config; | |
const slack = require('slack-notify')(webhookUrl); | |
return new Promise((resolve, reject) => { | |
slack.send( | |
{ | |
icon_url: iosManifest.iconUrl, | |
text: `${iosManifest.name} v${iosManifest.version} published to ${url}`, | |
unfurl_links: 0, |
This file contains 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
/** | |
* @providesModule Effects | |
* @flow | |
*/ | |
import { Linking } from 'react-native'; | |
import AppDataApi from 'AppDataApi'; | |
import Actions from 'Actions'; | |
import ActionTypes from 'ActionTypes'; |
This file contains 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
setTimeout(function() { | |
postMessage('hello there'); | |
}, 500); | |
onmessage = function(e) { | |
console.log('Message received from main script'); | |
var workerResult = 'Result: ' + (e.data[0] * e.data[1]); | |
console.log('Posting message back to main script'); | |
postMessage(workerResult); | |
} |