DEV Community

loading...

interview questions on React Native Web (2019)

johnathonroy5 profile image Johnathon roy ・4 min read

React Native Web is the library used to build latest websites by using React DOM. To make it possible to run React Native components and APIs on the web.

Although React Native Web is the high-quality web interfaces that make it easy to create fast, adaptive web UIs in JavaScript. Although, it provides native-quality interactions, support for multiple input modes (touch, mouse, keyboard), optimized vendor-prefixed styles, built-in support for RTL layout, built-in accessibility, and integrates with React Dev Tools.

As well as Write once, render anywhere with existing React DOM components and is compatible with the majority of the React Native API. And to develop new components for native and web without rewriting existing code. React Native for Web can also render to HTML and critical CSS on the server using Node.js.

Top 10 interview questions on React Native Web.

Ques 1. What is React Native web?

Ans. React Native for Web is intended to let you write a single app that runs in a browser using standard web technologies, or on iOS and Android as a real native. It is one of the most amazing ideas for UI developers, it makes a longtime dream a reality as well as the ability to create an application that runs on both phones and browsers with just one codebase.

Ques 2. Name the Components of React Native Web?

Ans. There many several components that are useful for the react native web to display the list, button, box, Image, background image, etc. on the web. The components are:

ActivityIndicator
Button
CheckBox
FlatList
Image
ImageBackground
ListView
Picker
SafeAreaView
StatusBar
ScrollView
SectionList
Switch
Slider
Touchable
TouchableHighlight
View
YellowBox
VirtualizedList
TouchableWithoutFeedback
SectionList

Ques 3. Name the Modules used in React Native Web?

Ans. There are useful modules that help in developing the web.

AccessibilityInfo
Animated
AppRegistry
AppState
Clipboard
Easing
Geolocation
Dimension
Keyboard
Linking
Platform
StyleSheet
Share
TextPropTypes
UIManager
Vibration
ViewPropTypes
PixelRatio
NetInfo
NativeModules
Linking

Ques 4. What are the integrations using in React Native Web?

Ans. There are 7 major integrations using in React Native Web:

Docz
Gatsby
Next.js
Phenomic
Razzle
Storybook
Styleguidist

Ques 5. How to build mobile-friendly web Apps with React Native Web?

Ans. React Native web make things easier to the developer to build the user-friendly webs that easily access in mobiles as well as personal computers. Many developers using their skills to make these web pages more attractive as well as user-friendly. Although, it is new and people even don’t have much knowledge about it so sometimes it’s quite difficult too but once it understands by the developers then it is the best to develop a web.

Ques 6. Explain the contributing and there uses in React Native Web?

Ans. The main purpose is to help evolve React web and native development towards the platform-agnostic design of React Native, although in the process making it faster and easier to build high-quality experiences for the web with React. As well as useful for contributing bug-fixing and improvements.

There are major contributing are listed below:

Reporting Issues and Asking Question
Getting started
Automated tests
Compile and build
Website and visual tests
Benchmarks
There are two new features named Pull requests and Releases.

Ques 7. Name the license under which React Native web is using?

Ans. MIT license is the license used by React Native Web. MIT license is a short and simple permissive license with conditions only requiring preservation of copyright and license notices. Licensed works, modifications and larger works may be distributed under different terms and without source code.

Ques 8. React native web as universal UI language. Classify.

Ans. The first reason is that React Native uses a kind of subset of React to generate the UI. If we want a code that runs in both mobile and web, we should stick with the more restrictive one; in this case, it’s React Native. As long as we don’t use modules that require some native functionality, a React Native app should work in browsers through react-native-web out of the box.

The second reason — and what really makes React Native superior to React for creating webs — is that React Native is pure UI language. It defines some base components that define UI primitives, and those are thought to be independent of the platform that runs them.

Ques 9. What are the things that made React Native Web more interesting?

Ans. React appeared and changed the way we think about creating webs.

Secondly, React Native was initially created to work on mobile platforms, and it is highly influenced by the way native webs are developed. Moreover, be that as it may, it preserves some key elements that make it feel closer web development: JavaScript and React DOM.

Finally, react-native-web was created to take those React Native applications and make them run in browsers again.

Ques 10. Why React Native Web use ReactDOM?

Ans. This function is used to render a single React Component or several Components wrapped together in a Component as well as a div element. This function uses the efficient methods of React for updating the DOM by being able to change only a sub-tree, efficient diff method, etc.

Secondly, ReactDOM is a package that provides DOM is a method that can be used at the top level of a web app to enable an efficient way of managing DOM elements of the web page. ReactDOM provides the developers with an API containing the following methods and a few more are:

render()
findDOMNode()
unmountComponentAtNode()
hydrate()
createPortal()

Discussion (0)

pic
Editor guide