I have knowledge about react native with cli, while in most of the courses they used react native with expo, my question is that , can i follow a course while i am using react native with cli? are there big differences between them ?
For beginners, I would recommend going with Expo since it will take a lot of your headache away, and later, when you are more familiar with the React environment, you can always eject from Expo to Bareflow, which works similar to the React-Native CLI but comes under Expo.
In my opinion, React-Native CLI gives you more freedom, liberty, and control to express and experiment over your code whereas, Expo binds you in a shell where you rely more on Expo dependencies. The choice is yours depending on your level of the React expertise.
hope you got your answer
Related
I have an upcoming project to build an app that does OCR and i want to ask is there anyway to do ocr with react-native and expo because react-native is my preferred framework and expo makes it really easy.
There has been many ways currently provided in react native to do ocr. One of them, You can simply download react-native-tesseract-ocr and follow the instruction here https://www.npmjs.com/package/react-native-tesseract-ocr. There is also github link related that here https://github.com/jonathanpalma/react-native-tesseract-ocr
You can also try out react-native-mlkit-ocr module for OCR on React native.
check it out here!
What finally worked for me, was to simply create a flask api for the OCR functionality.react-native-tesseract-ocr did not help at all.
I recently got to know about snowpack and it's advantages but the thing is all the available tutorials are on how to make a react app with snowpack but I wanted to use it with react-native. I saw that expo uses webpack does that mean we can use snowpack instead by initializing a bare react-native app. Any help would be appreciated (like link of any tutorial).
NOTE :
I did get a github discussion saying the author doesn't have enough knowledge about react-native in particular. Does that mean he will have to do some additional work for supporting react-native?
I'm a ReactJS developer, and I'm learning React Native for an upcoming project.
With ReactJS, there is a great boilerplate which is widely used by ReactJS developer: https://www.reactboilerplate.com/ (There are also many other great boilerplate).
However, after researching for a day, I haven't figured something similar to React Native. Please, can someone suggest to me a boilerplate for React Native?. Is there a standard project structure out there?
Actually there is not much difference from ReactJs. It really depends on navigation library you are choosing. The best options are:
React Navigation (JS based navigation library)
React Native Navigation (Native navigation library)
I suggest seeing example projects of both libraries.
You should try:
https://github.com/react-community/create-react-native-app
Also read documentation about React Navigation.
You can use the react native Ignite CLI Github which seems to be very similar, it's probably one of the most advanced Boilerplates for React Native and can be difficult to understand, thus when starting with React Native I would advise you to use none at all or just use your React structure
I recommend using the Handidev boilerplate since it only consists of the minimum library that every react-native project uses. And it has been used in many projects. This boilerplate consists of :
latest react-native version
react-navigation and its dependencies
redux-toolkit ( state management)
react-native vector icons ( for icons)
You can check it out here:
javascript version: https://www.npmjs.com/package/#handidev/react-native-boilerplate
npx react-native init MyApp --template #handidev/react-native-boilerplate
TypeScript version: https://www.npmjs.com/package/#handidev/react-native-typescript-boilerplate
npx react-native init MyAppName --template #handidev/react-native-typescript-boilerplate
I've had so many troubles with the tool, I seriously have been debugging expo morethan the app itself.
How might I remove expo completely from CRNA? I would like to use CRNA and it's debugging tools without expo
You can do it by ejecting your app running npm run eject
Then, if you have any reference to expo just remove all of them.
your app modules before being ejected looks like this below:
When you run npm run eject it will ask some questions like:
be sure to select React Native: I'd like a regular react Native project
And your folders will now look like this (no expo):
Just be careful because ejecting is a permanent process, you should make a backup of your files.
Once you eject from Expo, though, and if you're using a Windows computer, you'll only be able to develop for Android, I believe. You'll still need a Mac to work in React Native without Expo. I'm a beginner but just wanted to highlight this difficulty faced by Windows users when ejecting from Expo.
I am a newbie to React Native and I have just started leaning it. During its installation, came across the following commands
npm install -g create-react-native-app
npm install -g react-native-cli
It says that the first one is the easiest way to start building a new React Native application, where as the second is from older mode of installation. How these two ways differ from each other? Which one should be selected especially as a beginner like me to learn React Native? Which one is the best way to install React Native?
The create-react-native-app package is a community-driven package that gives you a basic template for React Native so you can start right away instead of having to set up Babel, Expo (which allows for cross-platform development), etc. It's a great way to start with React Native without having to set up any boilerplate or have an Apple machine for iOS projects. It's a CLI that generates a project for you to start without any hassle.
But create-react-native-app has its limitations. The tradeoff is out-of-box ease for less customizability. That's where react-native-cli comes in. This is the CLI that is used to create new pure React Native projects, run them, etc. This does not include Expo which does not allow for the ease with CRNA nor cross-platform development (you'll have to use an Apple machine for iOS). But with a pure React Native project, you can add native libraries and APIs for your project, which is not possible with CRNA. You can achieve a pure React Native project from a CRNA project by ejecting down the line.
I would suggest CRNA as a starting point because it allows you to use Expo to demo your apps on devices quickly and has support for both Android & iOS, regardless if you have Xcode or not -- without any configuration hassle. But it comes with limitations which you can alleviate with ejecting (but will lose other capabilities).