react native 개발을 하면서 기획에 따르거나 특정 라이브러리를 사용하는 경우, Old Architecture(Bridge) 에서 New Architecture(Fabric) 로 변경 해야됩니다.
Android 일 경우, android/gradle.properties 파일의 코드를 수정하면 됩니다.
...
newArchEnabled=true -> Default로는 false 되어 있습니다. 이 부분을 'true' 로 수정하면 됩니다.
...
iOS 일 경우, 프로젝트 내 package.json 파일의 코드 중 scripts 부분에 코드를 추가하면 됩니다.
scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start -- --reset-cache",
"pod-install": "cd ios && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install", <-- 이 코드를 추가해주면 됩니다.
"test": "jest"
},
그 다음으로 ios 디렉토리에서 yarn pod-install 명령어를 입력해주면 됩니다.
이 과정을 거쳐주면 프로젝트 Architecture type은 Fabric 으로 전환됩니다.