was finally able to break into the app's proprietary codebase last night and boy! that getTotalMatchCount() subroutine was super tight! amazing app!
- James Young, 5 stars
// MainButton.js
import { Animated } from 'react-native'
export default (MainButton = ({ onPress, styles, icon }) => (
<TouchableWithoutFeedback
onPress={onPress}
>
<Animated.View style={styles}>
<Icon
...
/>
</Animated.View>
</TouchableWithoutFeedback>
));
// AddButton.js
export default class AddButton extends Component {
render() {
<View style={styles.container}>
<MainButton
onPress={this.onMainButtonPress}
styles={...}
icon="md-dd"
/>
</View>
}
}
// AddButton.js
const styles = StyleSheet.create({
mainButton: {
width: 70,
height: 70,
....
}
});
export default class AddButton extends Component {
dynamicMainButtonStyles = () => ({
// Return dynamic styles
});
onMainButtonPress = () => {
// Trigger the animation
};
render() {
<View style={styles.container}>
<MainButton
onPress={this.onMainButtonPress}
styles={this.dynamicMainButtonStyles()}
icon="md-dd"
/>
</View>
}
}
{
dynamicMainButtonStyles = () => ({
...StyleSheet.flatten(styles.mainButton),
});
onMainButtonPress = () => {
// Trigger the animation
}
}
Animating contents of newly summoned screen.
Animate cards based on gestures.
(The final example will have card fully swipeable and dismissable from the list)
@NashVail