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
<TextInput | |
height={20} width={100} borderWidth={1} | |
borderColor="#000" marginTop={10} onChangeText={this.change} | |
/> |
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
<TextInput | |
height={20} | |
width={100} | |
borderWidth={1} | |
borderColor="#000" | |
marginTop={10} | |
onChangeText={this.change} | |
/> |
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
const processUserName = username => username.trim() | |
const processPassword = password => password.substring(0, 6) |
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
const process = (type, value) => { | |
switch(type){ | |
case 'username': return value.trim(); | |
case 'password': return value.substring(0, 6); | |
} | |
} |
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
// @flow | |
import React, {Component} from 'react'; | |
import type {ComponentType} from 'react'; | |
import B from './B' | |
class A extended Component<any> { | |
ref = {} |
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
// @flow | |
import React, { Component } from 'react'; | |
import type { ComponentType } from 'react'; | |
export default WrappedComponent=> ( | |
class EnhancedComponent extends Component<any> { | |
wrappedInstance: ?ComponentType<any> = null; | |
setWrappedInstance = (c: any) => { this.wrappedInstance = c; }; | |
render(){ | |
return (<WrappedComponent ref={this.setWrappedInstance} {...this.props}/>) |
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
// @flow | |
import React, {Component} from 'react'; | |
import type {ComponentType} from 'react'; | |
import { | |
View, | |
Text | |
} from 'react-native'; | |
import hoc from './hoc'; |
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
// @flow | |
import type { ComponentType } from 'react'; | |
const containers = {}; | |
export const setContainer = (newContainer: ComponentType<any>) => { | |
if (newContainer && newContainer.name) { | |
containers[newContainer.name] = newContainer; | |
return; | |
} | |
throw new Error('container has no name'); |
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
// @flow | |
import React, {Component} from 'react'; | |
import type {ComponentType} from 'react'; | |
import {connect} from 'redux'; | |
import { | |
View, | |
Button, | |
Text | |
} from 'react-native'; |
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 { | |
call, | |
put, | |
take, | |
takeLatest, | |
race, | |
select | |
} from 'redux-saga/effects'; | |
import { |
OlderNewer