whats the real diff between "create-react-native-app myproject" and "react-native init myproject" -


i started react native , following guide on tutorial there 2 option 1 create project via "react-create-native-app myproject" , other 1 "react-native init myproject".

the first one(create-react-native-app) generates app.js whereas other 1 generates index.android.js , index.ios.js..

i know somehow doing same job whats real diffirence here ? 1 should pick start , when other 1 more usefull over?

the create-react-native-app ("crna") cli builds project template based on expo, third-party toolkit allows write cross-platform react native applications using only javascript, , provides smoother workflow getting app running on real device. in addition, expo provides access tons of native apis, you'd need libraries or custom native code.

expo great, , in ideal world, app developers prefer use, expo's architecture sets unfortunate limitation: cannot write custom native modules, or integrate third-party libraries depend on custom native code isn't build expo. means have access native functionality provided react native , expo, , cannot extend it.

by contrast, react-native cli's init command creates plain react native app template, native ios , android projects can modify. downside of approach you'll need set native ios , android build chains on computer, , it's more cumbersome started developing , deploying app.

luckily, expo provides way detach crna app native app shell. convert crna project similar plain project created react-native init, access expo sdk functionality.

in practice, best approach beginners , new projects start create-react-native-app, , evaluate whether you'll need detach later. expo provides handy guide making decision.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -