iflow
iflow copied to clipboard
iflow can using in React Native?
Of course, iFlow and React-iFlow can be run in any support ES6+ JavaScript environment, also including react-native. Welcome to use iFlow.
Thanks!
Proxies are not supported by Android for React native. I get error message: " Can't find variable: Proxy Pipe index.js 746:72 "
Sorry, too late to reply you. I try to build on React Native v0.53.0, it's OK.
Simple code:
react-native init example
cd example && yarn add iflow react-iflow
vi App.js
App.js code:
import React, { Component } from 'react';
import { View, Text, Button } from 'react-native';
import iFlow from 'iflow';
import flow from 'react-iflow';
class App extends Component {
render() {
return (
<View>
<Button
onPress={this.props.store.add}
title="+"
/>
<Text>
{this.props.store.counter}
</Text>
</View>
);
}
}
const store = iFlow({
counter: 1,
add(){
this.counter++
}
}).create()
export default flow(store)(App)
save App.js and run the project.
react-native run-ios
It's done, Have a good time, 👍 !