ZHUORAN LI
GitHub: @lzhuor
"Ex"-favourite YouTuber
The TechLead
Languages Worked on:
Styles
Current Stack at Work
Hybrid Experience
React Component
Flutter Widget
Swift UI
React
Flutter
ID
React Component
Flutter Widget
React Native
Flutter
React (Web)
React Native (Mobile)
Flutter
React
Flutter
React Component
Flutter Widget
Flutter Widget
React Component
render
componentDidMount
componentDidUpdate
componentWillUnmount
...
this.setState
stateless component
stateful component
build
initState
mounted
didChangeDependencies
dispose
...
this.setState
stateless widget
stateful widget
Before Hooks
Life cycles
addPostFrameCallback*
Flutter Widget
React Component
React Component
Flutter Widget
Web (CSS) | Flutter |
---|---|
div | Container |
Flexbox | Row, Column, Wrap, Expanded, Flexible, mainAxisAlignment crossAxisAlignment |
margin, padding, vh/vw text-align | Padding, Center, Align, margin, padding |
position: absolute | Stack, Align, Positioned |
transform | Transform |
@keyframes | AnimationController, Tween |
const ShareFormContainer = styled.div`
margin: 3.2rem 0;
display: flex;
align-items: center;
${media.maxWidth.mobile`
margin-bottom: 0;
flex-direction: column;
`};
`
Web (Media Query)
Flutter (Media Query)
Provider
ScopedModel
Mobx
Redux-Thunk
Redux
<Context />
Flutter (BLoC)
React (Redux-Saga)
Communication among BLoCs
- Pass BLoC as param
- Service Locator (get_it)
Communication among Sagas
- Pass Saga as param
- actionChannel
Auth
User
// JavaScript
const result = yield(saga.call, args)
// Dart
const callback = () => { /*...*/ }
yield(saga.call, args, callback)
Statement
Expression
extension from RxDart
JavaScript, Redux-Saga
Dart, BLoc & RxDart
Dart
Dart
JavaScript
plugin
*react-intl as an example
en.arb
flutter pub run intl_translation:extract_to_arb --output-dir=assets/intl ./lib/**/*.dart
*Mixpanel official support is not available yet
https://endowus.com/invite?code=1XR8V