I'm wondering about this as well, actually this weekend been doing Flutter 'Test Drive' of their tutorial and experience was not that great. I'm still forcing my brain to parse this complex structure with very simple widget structure from their samples.
Its Flutter:
```
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
var appState = context.watch();
var pair = appState.current;
return Scaffold(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
BigCard(pair: pair),
SizedBox(height: 10),
ElevatedButton(
onPressed: () => appState.getNext(),
child: Text('Next'),
),
],
),
),
);
}
}
```
versus SwiftUI:
```
struct MyHomePage: View {
@StateObject private var appState = MyAppState()
var body: some View {
VStack {
BigCard(pair: appState.current)
.padding(.bottom, 10)
Button("Next") {
appState.getNext()
}
.padding()
.background(Color.blue)
.foregroundColor(.white)
.cornerRadius(8)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.padding()
}
}
```
versus React Native:
```
const MyHomePage = () => {
const [pair, setPair] = useState(/* initial pair /);
const getNext = () => {
// Logic to get the next pair
// You'll need to implement this function
};
return (
{/* Replace BigCard with appropriate React Native components */}
);
};
```