Install Expo modules is wrong/out-of-date

Section for how to update Android code is wrong. I used the default instructions for building a React Native bare project and the generated Android code looks totally different than what the expo doc above shows, so I have no idea what I’m supposed to change the code to in order to add Expo.

e.g Expo doc thinks that MainActivity’s createReactActivityDelegate() should originally be:

return new MainActivityDelegate(this, getMainComponentName());

but it’s actually:

return new DefaultReactActivityDelegate(
        // If you opted-in for the New Architecture, we enable the Fabric Renderer.
        DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled
        // If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18).
        DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled

Hi @mihaibulic, thanks for catching this! It might be that with latest React Native version and Expo SDK, things have changed. I’ll have to pass this info internally with our team and will update the docs.

1 Like

The docs are now up to date. Thank you for being patient with us!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.