- You pass the reducer to this, it actually ultimately receives all navigation calls via onNavigate, which is mostly equivalent to Redux dispatch. It setState and persisting state. it is like the redux "store"
This file contains hidden or 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 IncrementalListView | |
| */ | |
| 'use strict'; | |
| var InteractionManager = require('InteractionManager'); | |
| var LayoutAnimation = require('LayoutAnimation'); | |
| var ListViewDataSource = require('ListViewDataSource'); | |
| var RCTScrollViewManager = require('NativeModules').ScrollViewManager; | |
| var React = require('React'); |
This file contains hidden or 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
| /** | |
| * Sample React Native App | |
| * https://github.com/facebook/react-native | |
| */ | |
| import React, { Component } from 'react'; | |
| import { | |
| AppRegistry, | |
| StyleSheet, | |
| Text, |
This file contains hidden or 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 AuthenticationScreen | |
| * @flow | |
| */ | |
| export default class AuthenticationScreen extends React.Component { | |
| render() { | |
| // vvv typo on styles.container, but Flow doesn't care | |
| return ( | |
| <View style={styles.continer} /> |
This file contains hidden or 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
| ╭─ ~/universe/apps/rnplay flow | |
| node_modules/react-native/Libraries/StyleSheet/StyleSheet.js:135 | |
| 135: for (var key in obj) { | |
| ^^^ T. This type is incompatible with | |
| 135: for (var key in obj) { | |
| ^ iteration expected on object | |
| node_modules/react-native/Libraries/StyleSheet/StyleSheet.js:137 | |
| 137: result[key] = ReactNativePropRegistry.register(obj[key]); | |
| ^^^^^^^^ access of computed property/element. Computed property/element cannot be accessed on |
This file contains hidden or 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); | |
| } |
This file contains hidden or 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 hidden or 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 hidden or 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" | |
| } | |
| } |