Does react-native support react 16? - reactjs

When trying react-native init myproject I am getting 16.0.0-alpha.5 as a react dependency
When installing react#16 I am getting the following warning:
UNMET PEER DEPENDENCY react#16.0.0
Note: Using react-native v0.49.1.

When you do react-native init, it initialize the project with the last react version working with it. React has always a few steps of development ahead of React native, because React Native is built with React. So you will have the latest react version included in the react native init project in a few weeks.

Related

React component to NPM package

How do I convert a React component into an NPM package which uses Tailwind CSS and Axios? Also, which dependencies should I include?
I created a React app folder using create-react-app, then built a component which uses Tailwind CSS for styling and Axios for fetching some records. Now, I need a way to convert it into an NPM package which can be installed and used in any React app using NPM install .
I have already tried building the package and publishing, but each time the dependencies are not working correctly, such as not displaying Tailwind style properly and not recognizing Axios.

Can I manually update the React version in my React Native app?

I created a 0.69.1 React Native app that came with React 18.0.0. Are these versions pinned to each other, or is it okay to update React to 18.2.0?
React Native 0.69.1 has a peer dependency on React with version "18.0.0" (exactly that version) (from package.json). So the short answer is no, you cannot change
the version of React to 18.2.0 while keeping React Native at 0.69.1.
It looks like RN 0.70.x is going to have a peer dependency on React with version "18.1.0" (again from package.json), so you can update both when RN 0.70.0 is released.

React Native UI-Kitten: Will running `npx react-native link` to link fonts affect other native modules?

I'm using UI Kitten with my latest React Native app, and in this section of the docs it says Run npx react-native link from the project root to link fonts with the native side. I haven't used npx react-native link in a long time because of autolinking. So my question is: will running npx react-native link affect any of my native modules or anything else in the app in a way that I should know about (other than the desired linking of fonts here)?

create react app is creating the project in typescript

I'm using:
npx create-react-app myproj
but my react is creating the app in typescript mode, i'm using the last versions updated create-react-app
any ideas why is using by default typescript ? i've tried:

Creating a React and React Native component in a single npm package

Is it possible to create a component, living in a single npm package, that would work in both React and React Native?
I have created two variations of a component (View vs div and so on), one for the web and one for react native. I could easily use a build script or something like preprocessor.js to build a react or react-native output of the library but is there a better way?
Have anyone had any luck building a component that you could simply npm install into a react or react native project and just have it use the correct implementation? Or would I have a problem where both the react and react-native dependencies would exist in my package.json? Thanks!

Resources