Skip to content

Instantly share code, notes, and snippets.

View testshallpass's full-sized avatar

Brian testshallpass

View GitHub Profile
@testshallpass
testshallpass / reduxrouter.js
Created October 4, 2018 02:14
redux router example
export default function AppContainer() {
return (
<View style={AppStyles.container}>
<Provider store={store}>
<RouterWithRedux scenes={AppRoutes} style={AppStyles.appContainer}/>
</Provider>
<DropdownAlert ref={ref => DropDownHolder.setDropDown(ref)} closeInterval={6000}/>
</View>
);
}
@testshallpass
testshallpass / dropdownholder2.js
Last active December 19, 2019 14:39
DropdownHolder Example #2
type AlertType = 'info' | 'warn' | 'error' | 'success'
export type DropdownType = {
alertWithType: (type: AlertType, title: string, message: string) => void
}
export class DropDownHolder {
static dropDown: DropdownType
static setDropDown(dropDown: DropdownType) {
@testshallpass
testshallpass / dropdownholder1.js
Created October 4, 2018 02:03
DropdownHolder Example #1
export class App extends React.Component {
render() {
return (
<View style={{width: '100%', height: '100%'}}>
<Nav/>
<DropdownAlert ref={(ref) => DropDownHolder.setDropDown(ref)}/>
</View>
)
}
}