- Use the following package versions:
+ "metro-react-native-babel-preset": "^0.59.0",
+ "react-native": "0.63.0",
+ "react-native-macos": "^0.63.23",| - name: Restore yarn workspaces | |
| id: yarn-cache | |
| uses: actions/cache@master | |
| with: | |
| path: | | |
| node_modules | |
| */*/node_modules | |
| key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
| - name: Install dependencies | |
| if: steps.yarn-cache.outputs.cache-hit != 'true' |
Hello there.
So, if you are here you probably saw my previous tweet where I asked for tips & tricks on improving the timing on an iOS/React Native app build time.
What will follow was how I mixed those suggestions + some good old GoogleSearch-fu + me deep diving on this for ~2 days.
| import { useRef, useCallback, useEffect } from 'react'; | |
| // A callback that always closes over the latest data but keeps the same | |
| // identity and will not be called after component unmounts | |
| const useStableCallback = callback => { | |
| const callbackRef = useRef(); | |
| const memoCallback = useCallback( | |
| (...args) => callbackRef.current && callbackRef.current(...args), | |
| [], |
| /** | |
| * Metro configuration for React Native | |
| * https://github.com/facebook/react-native | |
| * | |
| * @format | |
| */ | |
| const { | |
| getSymLinkedModules, | |
| getBlacklistedModulesForAlternateRoot, | |
| getExtraModulesForAlternateRoot, |
| import { | |
| findNodeHandle | |
| } from 'react-native' | |
| this.childItem.measureLayout(findNodeHandle(this.containerWrapper), (x, y, width, height) => { | |
| console.log('got measurement', x, y, width, height) | |
| }) |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
| DO WTF YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 Alexey Silin <[email protected]> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WTF YOU WANT TO PUBLIC LICENSE |