LI Zhuoran
GitHub: @lzhuor
ZHUORAN LI
GitHub: @lzhuor
🎵 Clarinet, 🏀 Basketball, 🎿 Ski
🤯 What's happening?
😭 Sketch
Components
Core
Frontend
workspace
Monorepo
Check out once, develop all!
Components
Core
Core
Redux & Sagas
Core
API Client
Frontend
workspace
Monorepo
{
"test": "cross-env yarn wsrun test:build --fast-exit && yarn wsrun test"
}
{
"test:components": "yarn workspace silver-components test"
}
const Container = styled.div`
background: ${props => props.bgColor};
`
const Container = styled(BaseContainer)`
background: red;
`
Use defined name of color instead of hex code
<PublicLayout />
<SilverLayout />
const ShareFormContainer = styled.div`
margin: 3.2rem 0;
display: flex;
align-items: center;
${media.maxWidth.mobile`
margin-bottom: 0;
flex-direction: column;
`};
`
const { mobile } = useContext(MediaContext)
"scripts": {
"analyze": "cross-env-shell ANALYZE=true NODE_ENV=production webpack-cli --config webpack.config.prod.js"
}
💪 Alternative (SPA): React.lazy & <Suspense />
https://reactjs.org/docs/code-splitting.html
import Loadable from 'react-loadable'
import LoadableLoading from 'scenes/Common/LoadableLoading'
const Declaration = Loadable({
loader: () =>
import(
/* webpackChunkName: "declarations" */ 'scenes/Onboarding/Declaration'
),
loading: LoadableLoading
})
Survey.sg.a9dn1kdf7.js
Survey.us.f6alekd5m.js
Declare once, use anywhere!
Layout Component
Layout Component
Declare once, use anywhere!
Staging
Sample
Staging
Sample
Staging
Sample
plugin
Note: One challenge you may encounter with useEffect Hooks
useAction
useNotifications
Redux-Form
<Context />
By LI Zhuoran