Заказчиков всегда привлекают кроссплатформенные решения, потому что они разрабатываются в 2 раза быстрее. Но их же всегда волнует вопрос UX: сможет ли кроссплатформа предоставить такую же отзывчивость и красоту, как нативное решение? React Native говорит - да. Мы покажем, как за полчаса начать писать на React Native под две мобильные платформы сразу, обеспечивая при этом нативность внешнего вида и отзывчивость приложения.
2. About me
— Vladimir Ivanov - Lead software engineer
— More than 6 years in Android development
— Wide interest in Mobile technologies
— Happy father of a wonderful son
2
4. Why crossplatform?
1. Cheap development
2. because rapid
3. 3x faster than native approach
4. Native UX, at last
4
5. How is was to dive a year ago?
1. Install node
2. Install android/ios sdk
3. For android: install java, download platforms,
emulators, build tools
4. Learn React Native
5. ???
6. PROFIT!11
5
6. How it is now?
1. Install node
2. Learn React Native
3. create-react-native-app
4. Done
6
49. Component state
1. Each class based component has state
2. State is no more than a javascript object
3. Updating state is async, but this is not really
important now
4. Updating state happens with this.setState() function
49
50. Saving login and password to screen state
…
class LoginScreen extends Component {
state = { error: null };
…
}
50
51. Saving login and password to screen state
…
class LoginScreen extends Component {
state = { error: null };
onChangeValue = (prop, value) => {
this.setState({ [prop]: value });
};
…
}
51