ReactJS and React native component Library for styling - reactjs

I'm in the process of learning React JS and I wanted to use one of these library for my styling
ReactStrap
Material UI
The next step for me is to learn React Native as well , and I'm wondering if there will be a similar styling library for both react js and react native with very few differences?
So I could learn and use one library for both react js and react native rather than using two different things for each.

Ciao, I'm using Material UI for my reactjs app and react-native-material-ui for my react-native app. The two libraries are similar (not equal) but very similar and once you learned how to use one, the other one is quite simple to understand.

I`m using Themeor for both: React and React Native. This library has a similar approach to build styled components for React and React Native.
You don`t need to use Stylesheet in React Native and .css files in React projects. You better should read this article about Themeor component and colors using.

Related

What is the difference between React, ReactJS, and React Native? [duplicate]

This question already has answers here:
What is the difference between React Native and React?
(45 answers)
Closed 1 year ago.
I want to study a course about React, but I don't know couple of things, like:
What is the difference between React, ReactJS, and React Native ?
Well, if there is a big difference, What is the best one of them to study ?
I am really looking forward to study it, so if you got any information on the best way to start learning this course, I would appreciate it.
Thank you so much.
React and React.Js is one and the same.
React / ReactJs
ReactJS is an open-source JavaScript library used to build the user interface for Web Applications. It is responsible only for the view layer of the application. It provides developers to compose complex UIs from a small and isolated piece of code called "components." ReactJS made of two parts first is components, that are the pieces that contain HTML code and what you want to see in the user interface, and the second one is HTML document where all your components will be rendered.
React Native
React Native is an open-source JavaScript framework used for developing a mobile application for iOS Android, and Windows. It uses only JavaScript to build a cross-platform mobile app. React Native is same as React, but it uses native components instead of using web components as building blocks. It targets mobile platforms rather than the browser.
Link for Further information
What is the best one of them to study ?
React and React native both solves different kind of problem. React is common library between react and react-native which provides supports for hooks and generate virtual dom.
react-dom will render content on web using virtual dom created by react.
However on other side react-native will create bundle for android and iOS.
Main differences between Reactjs and React Native
When it comes to a web platform, Reactjs can be defined as a base
derivative of React DOM, while React Native acts as a base
derivative by keeping workflow and syntax the same alongside
altering components.
React is a JavaScript library that can help your developers in
building a highly responsive UI Layer and React Native on the other
hand is a complete framework to develop cross-platform applications.
Virtual DOM is used to extract browser code in React; native APIs
help in rendering components in mobile in React Native.
In React Native, UI is rendered with the help of JSX but the
applications curated with Reactjs extract HTML in UI.
For styling in Reactjs, CSS is used, and React Native platform
requires a stylesheet for styling.
Using CSS, you can carry out animation in Reactjs; for animation in
React Native, you need to use an animated API.

React version of React Native Elements

I'm used to writing React Native code, but I'm currently working on a React App, so I was wondering is there is something like React Native Elements but for React as such.
https://react-native-training.github.io/react-native-elements/
If I understand your question correctly, there are many UI component libraries suitable for React App development. A few that come to mind are:
Material-UI
React components that implement Google's Material Design.
https://material-ui.com/
React-Bootstrap
The most popular front-end framework, rebuilt for React.
https://element.eleme.io/#/en-US
Element-React
Element was initially written in Vue, which has many elegant UI components, but we also love React, so we forked it for the React community.
https://github.com/elemefe/element-react

How to use react j s components in react native app?

Is it possible to use all the reactjs components in react native app?If no,what is the best way to switch between react js and react native?
If an app is done using react js is it necessary(Compulsory) to use redux in that?
There are two main points:
1.The base UI components in React (DOM) and React Native are different.
2.The ‘React’ objects in React and React Native are different (React Native removes the DOM-specific stuff adds a lot of native-specific code).
please check this link for more details:
https://medium.com/#aakashns/sharing-components-between-react-and-react-native-f6ce3713658a#.oa4my8p36
I avoid these types of quests because React JS UI components built for the web have different semantics than React JS UI components built for React Native.
React Native doesn't have <div/> or <img/> or a DOM for that matter.
React Native uses React JS components that bind to native views, and things like CSS are so very different than that from the Web.
The only way you'd be able to use a React JS UI component in a React Native app is by making it 100% of the height and width of an embedded webview. It's possible (i've done it for testing purposes), but not ideal.
Is it possible to use all the reactjs components in react native app?
React Native uses other types of components which aren't related to HTML, but to iOS and Android views. Even the styling is slightly different.
If no,what is the best way to switch between react js and react native?
You can still reuse other parts of your code. If you use redux, for example, you should keep using almost the same code.
If an app is done using react js is it necessary(Compulsory) to use redux in that?
No, redux is just an implementation of the flux architecture. There are others, but redux is the most popular one.
If your component contains pure js logic, then yes. React js is meant for Web, where we make use of web semantic. React native extends mobile native UI components.

Are all React components usable in React Native?

There are lots of React components available. How do I know which ones are usable on React Native platform (IOS and Android)?
Web React components use DOM elements to display (ex. div, h1, table, etc) but these are not supported by React Native. You'll need to find libraries/components made specifically for React Native.
I doubt there are components that supports both, thus it should be fairly easy to figure out if it's made for React Native or not. As of now, if the creator does not specifically say that they made for React Native, it probably does not work on React Native.

Using React Native with AngularJS Components

From what I understand, React Native essentially allows you extend the functionality of React components to include native UI elements for mobile platforms. Angular 1.5 introduced components as more or less simple, best-practice directives.
I have a web application already written in AngularJS, and it would be amazing to be able to produce native mobile applications using React Native without having to re-write the front-end of the application completely in React.
Is it possible to use React Native to add native UI elements to Angular components instead of React components? I apologize if this is a silly question.
As of May 2016, you can now use angular and react native together. Check out Angular2 + React native

Resources