How to install native base in expo project? - react-native

I tried many ways to install native base in expo project
I was thinking this command will work
$ npm install native-base --save
but I can install native base in react native with this command

After you follow the quick start here
you have to follow Setup with CRNA steps to create React Native project using the CRNA cli.
I think you missing Install #expo/vector-icons step here.

I've created native-base working with expo environment named "expo-base".
You can check this out from here :-)
https://github.com/Dibyasundar444/expo-base

Related

When installing React Native Testing Library on an Expo project (uses React 18) I get an error

I have an Expo App (the last expo which uses React 18) that I want to run some testing on
But when trying to install React Native Testing Library, I get this error:
I wonder if this error means that it is incompatible with React 18
What do you suggest me to do?
Thanks in advance
Rafael
I solved the problem by using:
npm install --save-dev #testing-library/react-native --legacy-peer-deps

getting started with Vue native

I've installed Vue-native-cli
Do I need to install expo-cli and react-native-cli to use build project with vue native?
I've been seeing errors like
Expo not found and
React, React-dom not found when I run the command
vue-native init <projet name>
As it's written in the documentation: expo-cli or react-native-cli
System Requirements
Globally installed node >= 6.0
Globally installed npm >= 4.0
Globally installed Expo CLI OR React Native CLI
The information above can be found here
Edit: Not sure if I missunderstood to use build project. If you mean your project is already built (it's an APK file), then it's not needed to install the additional package. To run it, you can use android emulator, (for example BlueStacks) or transfer the app to your phone.

I want to start with react native without expo method.. i found this error

I got this error when i am trying to run my app in original device, everything according to react-native documentation
Try running your app with the yarn command, otherwise run npm-doctor to make sure all your packages are updated and fixed.
otherwise try installing dependencies for expo using :
npm install -g yarn
yarn add global react-native
yarn add global react-native-cli
react-native init sample
here's a quick link to the npm-doctor documentation:
https://docs.npmjs.com/cli-commands/doctor.html
Also here's some tutorial on running react-native app using yarn command:
How do I create a React Native project using Yarn?
I find this solution .. i just replace 6.2 with 6.3
in android/gradle/ gradle-wrapper.properties
distributionUrl=https://services.gradle.org/distributions/gradle-6.3-all.zip

New react-native-app with react-native 0.59.9 or lower

What is the best/easiest way to create new react-native-app using react-native-0.59.9 or lower?
Trying to use https://github.com/futurepress/epubjs-rn , which only runs in react-native 0.59 or lower.
The example app in https://github.com/futurepress/epubjs-rn/EpubReader does not work out of the box.
please use epubjs-rn-62
usage
To use the components in your own app install via npm or yarn
npm install --save epubjs-rn
import { Epub } from 'epubjs-rn';
Then you can add the reader element in your code:
<Epub src={"https://s3.amazonaws.com/epubjs/books/moby-dick/OPS/package.opf"}
flow={"paginated"} />
In order to start a new project with a specific React Native version, you can use the --version
react-native init ProjectName --version="0.59.9"
Check official documentation for more information.
EDIT
But in order to run an older version, you need to downgrade your React Native CLI version according to Compatibility of React Native CLI.
If you have already installed a version of react-native CLI, uninstall it using
npm uninstall -g react-native-cli
Then you have to install an older version as below,
npm install react-native-cli#1.0.0
Hope this will help you.

use create-react-native-app without expo-cli

I have set up create-react-native-app as said in the react native docs. If my project name is proj, according to the docs, the commands to be run should be :
create-react-native-app proj
cd proj
npm start
But when I run create-react-native-app, I get a menu to select a blank template or the one with tabs. And instead of npm start, it says to use expo start. Why am I getting a different output compared to the docs?
You can use:
react-native init projectName
Official documentation indicates different steps:
https://github.com/react-community/create-react-native-app#create-react-native-app
if you don't want to use Expo, just follow the eject steps:
https://github.com/react-community/create-react-native-app/blob/master/EJECTING.md. Optionally you can reate
or you can create a react native app by yourself without using the create-react-native-app script. More details here, https://facebook.github.io/react-native/docs/getting-started.html#creating-a-new-application
You can use the executable react-native package. This will not require you to install react-native as a global dependency:
npx react-native init yourProjectName