Skip to content

Instantly share code, notes, and snippets.

James Moran james2406

Block or report user

Report or block james2406

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View SectionListColumn.js
import React, { Component } from 'react';
import { StyleSheet, Text, Button, SectionList, TouchableOpacity } from 'react-native';
class Collections extends Component {
static renderHeader(title) {
return (
<Text style={styles.header}>{title}</Text>
);
}
View AsyncStorage.js
const asyncToken = callback => {
AsyncStorage.getItem('TOKEN').then(token => {
axios.defaults.headers = { authorization: token };
callback();
});
};
asyncToken(() => {
axios.get('http://localhost:3000/auth/testAuth').then((response) => {
alert(response.data);
You can’t perform that action at this time.