|
|
|
|
|
by ubertoop
2398 days ago
|
|
Yes, I do and I think a lot of it has been driven by hard and fast (reckless) development of really odd frameworks like react native: class AnimatedCollapsible extends React.Component {
state = {expanded: false};
render() {
return (
<View style={{overflow: 'hidden'}}>
<TouchableOpacity
onPress={() => {
LayoutAnimation.configureNext(LayoutAnimation.Presets.spring);
this.setState({expanded: !this.state.expanded});
}}>
<Text>
Press me to {this.state.expanded ? 'collapse' : 'expand'}!
</Text>
</TouchableOpacity>
{this.state.expanded && <Text>I disappear sometimes!</Text>}
</View>
);
}
} Look at this code. How is this okay? When were framework developers taught that mixing business logic and UI is a good idea? Seriously? |
|