import React, { Component } from 'react'; import { StyleSheet, View, TouchableOpacity, Text } from 'react-native'; import Interactable from '../../Interactable'; export default class HandleRelayout extends Component { constructor() { super(); this.state = { collapsed: false, }; } render() { return ( Tap to {this.state.collapsed ? 'expand' : 'collapse'} ); } onChangeLayoutPress() { this.setState({ collapsed: !this.state.collapsed, }); } } const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: 'white', }, card: { width: 300, height: 180, backgroundColor: 'red', borderRadius: 8, marginVertical: 6, }, label: { textAlign: 'center', fontSize: 24, }, });