Top 10 React Native Senior Level Interview Questions & Answers in 2021 #4

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi welcome to programming with mash prepare in advance for your interview with the best possible react native interview questions and answers in this part we will review the best questions at the senior level describe flux versus redux architecture the flux architecture is based on the following components action enables data passing to the dispatcher dispatcher coordinates actions and updates to stores store or stores serves as a container for the app state and logic view displays the model in the ui in the context of react components redux is a library which implements the idea of flux but in quite a different way redux architecture introduces new components like reducer logic that decides how your data changes exists in pure functions centralize the store hold the estate object that they not say state of the entire app what does a stylesheet.create do and what are refs in react native the stylesheet.create function in react native is used for the following it validates the keys and registers them to react it creates a stylesheet style reference from the specified object it allows you to send this style only once through the bridge while referring to all subsequent users through id refs is short form for reference and used to access underlying dom nodes or react elements within a react component what is async srh how and when do you use it async storage is a simple asynchronous unencrypted by default module that allows you to persist data offline in react native apps the persistence of data is done in a key value storage system there are numerous scenarios where this module can be beneficial persisting data in a mobile app has benefits such as when the user restarts the app the data or the setting variables being available to the user in this state they left before closing the app for example with this code we save the user's age with the identifier of a storage key and with this code we retrieve the user's edge with that key we use async storage when persisting non-sensitive data across operons persisting redux state persisting graphql state string global app-wide variables and we don't use it for talking a storage and the secrets what are the differences between class and functional component the essential differences between the class component and functional component are syntax the declaration of both components is different a functional component takes props and returns react element whereas the class components require to extend from react state the class component has a state while the functional component is estateless of course the functional component can use the state hook lifecycle the class component has a lifecycle while the functional component doesn't have a life cycle why should we use typescript in react native we type a script it's easy to define prop types making the code much easier to read and use and this will accompany by intellisense support plus a static type checking when a developer is working on a project and wants to maintain the project for a long period of time then the user should need typescript in order to use the typescript user should need to configure the title script because it gives an option to configure the compiler users can configure the typescript as per their requirements and can effectively prioritize the type of errors what is the use of the arrow function the use of arrow functions in react native is to help reduce your application's memory consumption it's done by reducing the cpu time required to iterate the overloops to generate the components necessary for your lists here's an example of arrow function in render what is the difference between shadow dom and virtual dom shadow dom creates small pieces of the dom object which has its own isolated scope as they represent it's a tool that is used in building the apps and websites that are based on components it comes in small pieces and doesn't represent the whole document object model virtual dom creates a copy of the whole dom object it's a concept of dom which is being used by react.js it's done to improve the performance of the ui libraries how to call web service in react native react native provides the fetch api for networking needs to fetch content from an arbitrary url we can pass the url to fetch here's an example to call a web service to react native with fetch networking is an inherently asynchronous operation fetch methods will return a promise that makes it as straightforward to write code that works in an asynchronous manner what are animations in regnative the animation is a method in which images are manipulated to appear as moving objects react native animations allow you to add extra effects which provide great user experience in the app we can use it with react native api animated.parallel animated.dk and animated.stagger reagnative has two types of animation which are given below animated this api is used to control specific values it has a start and stops methods for controlling the time-based animation execution layout animated this api is used to animate the global layout transactions describe timers in react native application set timeout clear timeout there may be business requirements to execute a certain piece of code after waiting for some time duration or after a delay set timeout can be used in such cases clear timeout is simply used to clear the timer that is started set interval clear interval set interval is a method that calls a function or run some code after a specific intervals of time as is specified through the second parameter a function or belkov code that is bound to an interval executes until it's stopped to a stopping interval we can use the clear interval method set immediate clear immediate calling the function or execution as soon as possible this code displays the alert dialog immediately clear immediate is used for cancelling the immediate actions that were set by set immediate well i hope you have a successful interview in addition you can use the react native tutorial series on the channel to improve your technical skills in the next part we will review the expert level together you
Info
Channel: Programming with Mash
Views: 14,006
Rating: undefined out of 5
Keywords: react native interview senior level, react native interview questions and answers, react native interview questions for freshers, react native interview questions, Javascript interview questions, react interview questions, react native 2021, react interview, react native, react native tutorial, react native for beginners, react tutorial, react native tutorial for beginners, beginners, react vs react native, programming with mash, interview questions and answers, Interview tips
Id: 9OeyfJQMb-E
Channel Id: undefined
Length: 7min 51sec (471 seconds)
Published: Fri May 07 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.