React Native Mock Interview | Interview Questions for Senior React Native Developers

Turing
11 Jul 202223:11

Summary

TLDRIn this episode of the Touring Mock Interview series, Tech Lead Jose interviews a React Native developer, exploring their expertise in JavaScript and React Native. The interviewee shares their educational background, professional experience, and details of their work on various React Native projects. They delve into topics like the difference between props and state, higher-order components, custom hooks, and debugging techniques. The conversation also touches on the use of Flexbox in React Native and the challenges of building TV applications with React Native. The session concludes with a reminder to subscribe for more valuable content and job opportunities on Touring.com.

Takeaways

  • 😀 The video is part of a mock interview series focused on interviewing for a React Native developer role.
  • 🔍 The interviewer, Jose, is a tech leader at Touring with over 17 years of experience, emphasizing the vetting process for hiring engineers.
  • 🎓 The interviewee has a background in computer science, with experience in various technologies including JavaScript, React, Angular, Node.js, and React Native.
  • 🛠️ The interviewee has worked on numerous React Native applications, including real-time communication, streaming, geolocation, and social media features.
  • 📚 The interview covers basic React Native concepts such as the difference between props and state, container components, and component-driven development (CDD).
  • 🔬 The script discusses the importance of testing in CDD and the similarities between CDD and atomic design in creating reusable UI components.
  • 🌐 Flexbox is highlighted as a key layout tool in React Native, with some differences from its use in web CSS.
  • 🔄 Higher-order components (HOCs) and higher-order functions are explained, with examples of how they are used to extend component functionality.
  • 🔧 Custom hooks in React Native are discussed, including their creation and use for state management and UI logic.
  • 🔍 The use of refs in React Native is explained, emphasizing their utility for direct manipulation of variables without triggering re-renders.
  • 🚀 The video concludes with advice on finding jobs on Touring.com and encourages viewers to engage with the content by liking, commenting, and subscribing.

Q & A

  • What is the purpose of the 'touring mock interview series'?

    -The purpose of the 'touring mock interview series' is to demonstrate the interview process and to give candidates an idea of the types of questions they might face in a real interview for a React Native developer role.

  • What is Jose's role in the interview?

    -Jose is a tech leader at touring and he is conducting the interview with the candidate, Musaian, for the role of an experienced React Native developer.

  • What is the difference between 'props' and 'state' in React?

    -In React, 'state' is used to control the components and store variable data that can change over time, making it mutable. 'Props', on the other hand, are used to pass data to different components and are immutable, meaning their values cannot be changed by the component that receives them.

  • How can you update the 'props' in a React component?

    -Props cannot be directly changed by the component that receives them. To update the props, you need to pass new values through the parent component that owns the current component.

  • What are 'container components' in React?

    -Container components in React are components that have access to the store, can make API calls, and contain the app's business logic. They are responsible for passing down the necessary data and behavior to presentation components through props.

  • What is 'Component Driven Development (CDD)' and how does it benefit the development process?

    -Component Driven Development (CDD) is a development methodology that focuses on building the UI from the bottom up, starting with individual components and ending with full pages or screens. Benefits include faster development, increased UI coverage, targeted feedback, building up a component library, and easier testing.

  • How is 'Component Driven Development' similar to 'Atomic Design'?

    -Component Driven Development is similar to Atomic Design in that both methodologies start by creating smaller components and then combining them to form larger components, which eventually make up the UI of an application.

  • What is the best practice for testing in Component Driven Development?

    -The best practice for testing in Component Driven Development involves using a testing framework to write test cases for individual components, executing those test cases, and verifying that the output matches expected results.

  • Can you explain the use of 'Flexbox' in React Native?

    -Flexbox in React Native is used to create layouts that are consistent across different screen sizes. It works similarly to Flexbox in CSS with some differences in default values, such as 'flexDirection' defaulting to 'column' and 'alignItems' defaulting to 'flex-start'. Flexbox allows developers to control layout with properties like 'flexDirection', 'alignItems', and 'justifyContent'.

  • What is a 'Higher-Order Component (HOC)' in React?

    -A Higher-Order Component in React is a function that takes a component and returns a new component. It is used for code reuse, where the new component enhances the functionality of the original component without modifying its implementation.

  • How can custom hooks be used with React Native?

    -Custom hooks in React Native can be used to encapsulate and reuse stateful logic across different components. They are created using the 'use' prefix, such as 'useState' or 'useEffect', and provide a way to abstract complex logic into reusable functions.

  • What is 'useRef' and how is it different from state variables in React?

    -'useRef' is a hook in React that allows you to create a reference to a value in the DOM or to a piece of state. Unlike state variables, 'useRef' does not cause a component to re-render when the referenced value changes, making it useful for storing values that do not need to trigger a re-render.

  • How can screen navigation functionality be implemented in React Native?

    -Screen navigation in React Native is typically managed by a navigator, which handles the presentation and transition between multiple screens. Libraries like 'react-navigation' provide easy-to-use navigation solutions for common patterns like stack navigation and tab navigation.

  • What is the 'Reactive Virtual DOM' and how does it work in React Native?

    -The Reactive Virtual DOM in React Native is a virtual representation of the actual DOM in memory. It is used to optimize updates to the UI by only updating the components that have changed, rather than re-rendering the entire UI. This is achieved through a process called 'reconciliation', which compares the current virtual DOM with an updated version and applies changes using a diffing algorithm.

  • Can React Native be used to build applications for TV devices?

    -Technically, React Native can be used to build applications for TV devices, but the community support and documentation for this purpose are not as robust. While there have been efforts to make existing React Native applications work on Apple TV and Android TV with minimal changes, there are still challenges and a lack of widespread adoption for this use case.

  • How can you check if a React Native app is in debug mode or a release build?

    -In React Native, you can check if the app is in debug mode by using the environment variable '__DEV__'. If the value of '__DEV__' is true, the app is in debug mode; if false, it is in a release build.

  • What is the best way to debug a React Native application?

    -The best way to debug a React Native application is by using the Chrome Debugger. You can access it by shaking the device or pressing 'cmd+D' on the keyboard to open the developer menu. Once connected, you can debug the JavaScript code and inspect the UI through the Chrome browser.

Outlines

00:00

😀 Introduction to the Interview Series

The script introduces a mock interview series with Jose, a tech leader from Montreal, Canada, who discusses his role in hiring engineers. The interviewee, a React Native developer, shares their background in computer science and experience with various technologies. The conversation aims to demonstrate the interview process and what to expect, highlighting the developer's skills in JavaScript, React, Angular, Node.js, and mobile development with Swift and Kotlin.

05:01

🛠️ Technical Discussion on React Native Projects

In this paragraph, the interviewee delves into their experience with React Native, discussing the development of 15 to 20 applications and the creation of recognizable modules. They cover real-time communication, streaming, geolocation integration, social media features, and payment solutions like Stripe. The focus is on the breadth of their technical expertise and the variety of projects they have worked on.

10:01

📚 Exploring React Native Concepts and Best Practices

The conversation shifts to foundational React Native concepts, including the differences between props and state, container and smart components, and component-driven development (CDD). The interviewee explains the importance of testing in CDD and touches on the similarities between CDD and atomic design. Flexbox in React Native is also discussed, with the interviewee highlighting its role in creating consistent layouts across different screen sizes.

15:03

🔄 Advanced React Native Topics and Navigation

The interviewee discusses higher-order components (HOCs) and custom hooks in React Native, emphasizing their importance in managing state and side effects efficiently. The use of 'useRef' for direct manipulation of variables without triggering re-renders is also covered. The paragraph concludes with an explanation of screen navigation in React Native, mentioning the use of navigators and the 'react-navigation' library for managing multiple screens.

20:03

🎉 Reflecting on the Interview and React Native's Capabilities

Jose encourages developers with experience to apply for jobs on touring.com, highlighting the benefits of remote work. The script then returns to the technical interview, discussing the Virtual DOM in React Native and its efficiency in updating the UI. The interviewee also addresses the possibility of using React Native for TV applications, noting the lack of community support and documentation for this use case.

🛠️ Debugging Techniques and Wrapping Up the Interview

The final part of the script covers methods for checking if a React Native app is in debug mode, using environment variables. Debugging techniques, including the use of Chrome Debugger for inspecting both UI and JavaScript, are discussed. The interview concludes with a reflection on the shared knowledge and an invitation for viewers to engage with the content, subscribe to the channel, and follow on social media for more interviews and developer insights.

Mindmap

Keywords

💡Mock Interview

A mock interview is a simulated job interview that is conducted to help candidates practice their interview skills. In the video, the host, Jose, is conducting a mock interview with a candidate for a React Native developer role, which is central to the video's theme of demonstrating the interview process and providing insights into the technical skills required for the position.

💡React Native

React Native is a popular framework for building mobile applications using JavaScript and React. It is the main focus of the interview in the video, as the candidate is being evaluated for their experience and knowledge in developing applications with React Native. The script mentions various projects and functionalities the candidate has worked on using React Native.

💡Props and State

In React, props and state are fundamental concepts for managing and passing data within components. Props are used to pass data from a parent component to a child component and are immutable, while state is mutable and used to manage the internal state of a component. In the script, the candidate explains the difference between props and state, which is essential for understanding component behavior in React applications.

💡Container Components

Container components in React are responsible for the logic and data management of an application, often making API calls and handling business logic. They pass data to presentational components via props. The script discusses the role of container components, emphasizing their importance in structuring the application's architecture and separating concerns.

💡Component Driven Development (CDD)

Component Driven Development is a methodology that focuses on building the UI from the bottom up, starting with individual components and combining them to form pages or screens. The script mentions CDD as a way to increase UI coverage, build up a component library, and facilitate targeted feedback, which is crucial for efficient development and testing in React projects.

💡Atomic Design

Atomic Design is a methodology for creating design systems by breaking down UI components into smaller, reusable pieces. It is similar to CDD in that it starts with smaller components and builds up to larger components and pages. The script compares CDD to Atomic Design, highlighting the importance of creating modular and reusable components in React development.

💡Flexbox

Flexbox is a CSS layout module that provides a more efficient way to lay out, align, and distribute space among items in a container, even when their size is unknown or dynamic. In the script, the candidate discusses the use of Flexbox in React Native, emphasizing its role in creating consistent layouts across different screen sizes.

💡Higher-Order Components (HOC)

Higher-Order Components are a pattern in React where a function takes a component and returns a new component, extending the original component's functionality. The script explains HOC as a way to add functionality to components without modifying their source code, which is useful for code reuse and abstraction in React applications.

💡Custom Hooks

Custom Hooks in React are functions that allow you to extract and reuse stateful logic from your components. They start with the keyword 'use' and can be used to create custom logic that can be shared across different components. The script mentions custom hooks as a way to encapsulate complex logic and make components cleaner and more maintainable.

💡Refs

Refs provide a way to access DOM nodes or React elements created in the render method. They are used for direct DOM manipulation, which is rare in React, but can be necessary for performance optimizations or integrating with third-party DOM libraries. The script discusses refs in the context of React Native, explaining their use for direct manipulation and performance considerations.

💡Screen Navigation

Screen navigation is a core functionality in mobile applications that involves managing the presentation and transition between multiple screens. In the script, the candidate discusses implementing screen navigation in React Native using navigators, which is essential for creating a seamless user experience in mobile apps.

💡Virtual DOM

The Virtual DOM is a concept in React where a virtual representation of the DOM is kept in memory and used to optimize updates to the real DOM. It is the basis for React's efficient rendering process. The script explains how the Virtual DOM works in React Native, highlighting its role in minimizing direct DOM manipulation and improving performance.

💡Debugging

Debugging is the process of finding and resolving defects or problems in a software application. In the script, the host and candidate discuss various methods for debugging a React Native application, including using the Chrome Debugger to inspect the UI and JavaScript code, which is crucial for identifying and fixing issues during development.

Highlights

Jose introduces the mock interview series focusing on React Native development.

The interviewee, a React Native developer, shares their educational background and professional experience.

Developer discusses their experience with JavaScript technologies and React Native applications.

The importance of understanding the difference between props and state in React components is highlighted.

Explanation of container components and their role in handling business logic and API calls in React.

Introduction to Component Driven Development (CDD) and its benefits in UI development.

Comparison between CDD and Atomic Design in creating reusable UI components.

Best practices for testing in a component-driven development environment.

Flexbox usage in React Native for consistent layouts across different screen sizes.

Understanding higher-order components (HOC) and their function in React.

Custom hooks in React Native and their role in managing state and side effects.

The use of useRef for direct manipulation of variables without triggering re-renders.

Screen navigation implementation in React Native using navigators.

The concept of the Reactive Virtual DOM in React Native and its efficiency in updating the UI.

React Native's potential for building applications for TV devices despite limited community support.

Checking if a React Native app is in debug or release mode using environment variables.

Debugging techniques for React Native apps, including the use of Chrome Debugger.

Jose encourages developers to apply for jobs on Touring.com and engage with the community.

Closing remarks and call to action for feedback for future episodes of the mock interview series.

Transcripts

play00:00

[Music]

play00:07

[Music]

play00:10

hello everyone we are back with another

play00:12

round of touring mock interview series

play00:14

i'm jose and i'm tech leader touring and

play00:17

i'm from montreal canada and here i work

play00:19

hiring the best engineer by helping them

play00:22

with the vetting process i have more

play00:24

than 17 years of experience in my

play00:26

expertise rising javascript today i will

play00:29

be interviewing musician for the role of

play00:31

an experienced react native developer

play00:34

and i hope this turned out a great great

play00:37

great experience for you and just a

play00:39

quick reminder this interview this

play00:41

question is for you to purpose is to

play00:44

demonstrate how the process is and if

play00:47

you go to an interview uh you might get

play00:50

some different questions a few different

play00:52

questions sounds good

play00:54

all right so let's hear a little bit

play00:55

from you asian so first of all how are

play00:58

you doing and how your day doing so far

play01:02

thank you so much josie uh i'm doing

play01:04

great well

play01:05

thank you so much for the introduction

play01:08

cool man so um let's get start this

play01:12

interview okay i would like to ask you

play01:14

to introduce yourself uh and tell me a

play01:17

little bit about your background okay

play01:19

your professional experience

play01:21

and then i'll take from there sounds

play01:23

good

play01:29

pakistan uh i done my graduation in

play01:31

computer science from one of top renewal

play01:33

university of pakistan

play01:35

also

play01:36

i took various courses from harvard and

play01:38

microsoft through online platforms

play01:41

after graduate graduation i joined a

play01:43

software house locally as a software

play01:45

engineer

play01:46

where i start with javascript

play01:48

technologies including rect angular view

play01:50

for web

play01:52

and and for the backend uh node.js and

play01:54

for hybrid applications uh we use reg

play01:57

native and also i don't develop in

play01:59

native ios using swift and native

play02:01

android using cortex uh i worked there

play02:04

for almost 2.5 years after that i

play02:06

switched to the online freelancing

play02:08

platform where i mainly focus on

play02:10

javascript technology as technologies

play02:12

has a full stack developer and on a top

play02:15

rated field back there after uh i joined

play02:19

after i joined a touring and now i'm

play02:21

currently with one of healthcare

play02:22

organization

play02:23

through during

play02:25

great that's great uh all right so

play02:28

okay miss so

play02:30

uh could you please tell me okay um a

play02:34

little bit more about some interesting

play02:36

project that you have be working with uh

play02:40

react native okay let's focus on react

play02:42

natives because i check at your

play02:44

background okay if you are if i'm going

play02:46

to talk to you about everything this

play02:49

interview will take days okay but let's

play02:52

focus on react native could you please

play02:54

tell me a little bit about some

play02:55

interesting project that you have been

play02:57

work on

play02:58

yeah sure uh if i talk about a

play03:00

particularly native i develop almost 15

play03:03

to 20 plus application in react native

play03:06

uh and also wrote some recognitive

play03:08

module but to expose native

play03:10

functionalities of a native ios and

play03:13

android side on json

play03:15

so i work on real-time communication

play03:18

where i use sockets the custom solution

play03:20

and also using third-party libraries

play03:22

like sandboard and gate stream

play03:25

uh also working on real-time streaming

play03:28

using vivido

play03:30

and integration of real-time geolocation

play03:32

and using maps or working on social

play03:34

media features like uh feed listing

play03:37

like dislike comments sharing on diff on

play03:40

two different other uh social uh

play03:43

platforms also provide a login

play03:45

functionality uh the author using a

play03:48

google facebook linkedin uh and also

play03:51

work with the payment solution i like

play03:53

stripe update uh so yeah so almost i

play03:57

cover every

play03:59

uh thing in that native so these are my

play04:01

some glimpse of recognitive journey

play04:04

okay

play04:05

and i will start with basic questions

play04:08

okay and then we can progress uh uh

play04:12

during the interview and then we see how

play04:14

it goes okay so my first question for

play04:16

you is

play04:17

uh what's the difference between

play04:19

uh

play04:20

props and state

play04:23

yeah so if you talk about state it is

play04:25

used to control the components the

play04:27

variable data can be stored in the state

play04:30

it is mutable means a state can change

play04:32

the value at any time

play04:34

and props props are used to pass data

play04:37

to the different components it is

play04:39

immutable means prop cannot change the

play04:41

value uh it provide a container

play04:43

connection between a container component

play04:45

and a presentation component

play04:47

cool and if you want to update that prox

play04:50

oh sorry that props how would you do

play04:52

that

play04:54

send the props uh basically uh

play04:56

by passing the prop in the element

play04:58

section like for example we have a uh

play05:00

cloud we have a component a so i pass

play05:02

and the props has some data so uh using

play05:05

the open angular bracket a and then uh

play05:08

component name then the props name and

play05:10

is equal to the value of props and props

play05:12

cannot change the inner component use

play05:13

that value uh of prop but cannot change

play05:16

that

play05:17

cool and what are uh containers okay or

play05:21

smart

play05:22

components uh container components are

play05:25

those a wrecked component that have

play05:27

access to the store uh take these

play05:30

component make api call uh do some

play05:32

processing and contain the app business

play05:34

logic uh com container component

play05:37

shouldn't have view logic or

play05:38

presentation logic they have only uh

play05:40

some some business logic and api

play05:42

processing api calls and some uh

play05:45

business logic processing the basic job

play05:47

of container component is to complete

play05:49

the values and fall down as a props to

play05:51

the presentation component or the

play05:53

component hence due to their make

play05:55

processing api calls and the business

play05:58

logic containing stuff that's why we are

play06:00

referred as smart components

play06:03

cool and it's following some design

play06:05

pattern okay so uh what do you

play06:09

understand by a component driven

play06:12

development or a cdd

play06:15

yeah so component driver development or

play06:17

cdd is a development methodology that

play06:19

enters the build process around

play06:21

components it is a process that builds a

play06:24

ui from the bottom up by starting at the

play06:26

level of components and ending at the

play06:28

level of pages or screen some of its

play06:30

benefits are uh number one focus

play06:33

development uh increased ui coverage uh

play06:36

targeted feedback build up component

play06:38

library polarized development uh and

play06:41

testing aviva

play06:43

okay so you mentioned testing i kind of

play06:45

like it okay uh but before we go to

play06:47

testing uh these components different

play06:50

design or component driven development

play06:54

it's similar to a

play06:56

design pattern that i used to

play06:58

work years ago called atomic design

play07:01

right it's they are pretty similar so

play07:03

you start creating this smaller

play07:05

component which is great for react gs

play07:08

and for uh

play07:09

react native because of react as using

play07:12

reconciliation to update the

play07:15

uh the view based on components right

play07:17

you guys already know that so uh

play07:20

component driven development is similar

play07:22

to atomic design you create the smaller

play07:24

piece and then you are going to combine

play07:26

them to another component and then

play07:28

combine combine and combine is that

play07:30

correct

play07:32

yeah

play07:35

cool and how would you test them so

play07:36

what's the best practice in term of

play07:39

testing for a component driven

play07:42

development

play07:44

uh basically for the testing purpose uh

play07:46

we use adjust uh for the testing uh and

play07:50

and using some test cases uh and execute

play07:53

those test cases and then check the

play07:55

resulted output if it is match uh if it

play07:58

is flat as expected that the test case

play08:00

is passed otherwise uh it's failed

play08:02

cool

play08:03

all right so

play08:05

and so move on to

play08:07

more for ui okay could you could you

play08:09

please explain me the use of flexbox

play08:11

index native

play08:14

uh yeah sure so flexbox is designed to

play08:16

provide a consistent layout on different

play08:18

screen sizes uh flexbox works the same

play08:21

way in react native as it does in the

play08:23

css on the web but with a few exceptions

play08:26

the default are different with flex

play08:28

direction defaulting to column uh

play08:30

instead of row if you talk about web uh

play08:33

similarly align content defaulting to

play08:35

flex dot uh but in the web it's touch

play08:39

and similarly the flex chaining default

play08:40

to zero uh instead of one and the flex

play08:44

parameters support only a single number

play08:46

instead of multiple numbers we normally

play08:48

use a combination of flex direction uh

play08:50

align item and justify control to

play08:53

achieve the right layout

play08:56

i like to use flexbox as well okay just

play08:59

to mention just in addition to that

play09:01

okay all right so in regarding uh my

play09:05

previous question about components

play09:07

what do you understand about uh higher

play09:09

order components or higher functions

play09:13

so basically a high order component is

play09:15

hoc uh where the the parameter is of

play09:18

another component

play09:20

if we talk about the example it's

play09:22

similar to the foreign loop that in the

play09:24

for each itself functionally take

play09:26

another function as an input similarly i

play09:28

chose component is a component that take

play09:30

another component as an input

play09:33

great

play09:34

all right all right and just in addition

play09:38

to that uh we cannot use uh higher the

play09:41

component inside the rendered method

play09:44

because as i mentioned before right so

play09:47

react user reconciliation based on

play09:50

components to update the view so if you

play09:53

have a component that always change

play09:55

uh it

play09:56

you could break your application because

play09:58

it will start to be rendered forever

play10:01

right

play10:02

yeah similarly there are by default a

play10:04

multiple high component high order

play10:06

component defined by the library like

play10:08

the basic one is connect so it it accept

play10:10

the map state to prop map display to

play10:12

blob and another component yeah so but

play10:15

what you can create custom high order

play10:16

components too all right this one is the

play10:19

most famous one i would say connect from

play10:21

redux right also if you go for ui

play10:25

libraries like uh battery ui you will

play10:27

see um higher the function that start

play10:31

with with styles with this this index so

play10:34

this is a a good practice in term of uh

play10:37

high order components you start with the

play10:40

keyword with okay it's not mandatory but

play10:43

when you get a large application and

play10:45

then you see

play10:47

at the bottom you see i export with

play10:50

styles uh with hooks with this this is

play10:53

and that you see that that component

play10:56

or that function is a higher the

play10:58

components cool yeah sure

play11:01

it's the best pattern it's like the same

play11:04

thing that we are using the custom hook

play11:06

with by the starting with the use

play11:08

what's correct yeah and so by the way so

play11:11

how can we use

play11:13

uh custom hook with red native

play11:16

uh custom hook with the right native so

play11:18

uh it's like the same uh for example if

play11:21

we talk about the creation uh

play11:23

who contained some

play11:25

ui or some uh some manipulation logic so

play11:29

it's uh start with the word use like i

play11:31

have a some hook use uh

play11:34

like you state so it's using the we have

play11:37

two things one is value update function

play11:39

so it gets uh we have we use the array

play11:41

notation the open angle bracket the

play11:43

close active bracket and the first

play11:44

parameter is the data and the second

play11:46

parameter is for the set data so the

play11:49

second parameter is to set the state and

play11:50

the first parameter is the state

play11:53

state value

play11:55

cool and then use it starts to usually

play11:57

start with hooks right

play11:59

with the keyboard use uh and also uh

play12:02

what i recommend them of uh

play12:05

hierarchy components and

play12:07

react hooks as well custom hooks uh just

play12:09

create one state

play12:11

because every you know that react it

play12:13

will trigger render every time you uh

play12:16

change every uh

play12:17

state so when you are creating higher

play12:20

functions or higher components uh keep

play12:23

in mind just update the state when when

play12:25

is necessary because otherwise you will

play12:28

trigger rewind in your application all

play12:30

the time so just have one state you can

play12:33

use use refs okay to accumulate values

play12:36

but uh

play12:38

just update the state once it's ready

play12:41

okay and as we talk about use refs so so

play12:43

what do you understand about user refs

play12:46

uh user f is basically uh if you talk

play12:49

about the state variable uh if we can

play12:52

manipulate the state value by the help

play12:53

of use ref

play12:55

for example i have some state variable x

play12:57

and i have to uh

play13:00

keep i on that variable i am using use f

play13:02

and pass the

play13:03

the

play13:04

x variable there uh so now that that we

play13:07

have a reference of that variable and we

play13:09

have an uh every time if the value of x

play13:11

is changing we have a reference for that

play13:13

so we can

play13:14

manipulate or we can write our logic or

play13:16

primary

play13:17

correct and ref is different from value

play13:21

right so when you work with refs you are

play13:23

working with the reference not the value

play13:26

itself so if you score a set timeout and

play13:29

try to get the value from the user have

play13:32

you will get the delay the latest value

play13:35

right

play13:36

yeah and also it won't trigger every

play13:38

render that's a good tip for performance

play13:40

as well okay regarding react.js so

play13:45

let's now go back to react native uh

play13:47

specific question for react native okay

play13:50

how do you okay implement a screen

play13:53

navigation functionality in react native

play13:56

yeah so basically the screen on

play13:58

navigation was a main functionality of

play14:00

any mobile app there are different

play14:01

multiple screens involved for that so

play14:04

managing the presentation of and

play14:05

transition between a multiple screen is

play14:07

typically headed by what is known as a

play14:10

navigator a rack navigation provides an

play14:13

easy-to-use navigation solution

play14:15

with the ability to provide uh to

play14:17

present common stack navigation and tab

play14:20

navigation pattern on both android and

play14:22

ios the community solution is to uh

play14:24

navigation is a standalone library that

play14:27

allows developer

play14:28

to set up the screens uh of an app with

play14:31

a few just few lines of code

play14:34

yeah that was great okay yeah i just i

play14:38

would like to call upon our react uh

play14:40

native fellas here or any developer that

play14:43

are watching us today so if you have a

play14:45

three plus years of experience and are

play14:48

confident with the skill set that you

play14:49

possess you can head on turin.com's last

play14:52

jobs uh

play14:54

search for the job that is suitable for

play14:56

your tech text it could be react native

play14:58

could be

play15:00

uh react.js could be python java uh c

play15:03

sharp anything go to tuning dot com

play15:05

slash jobs search for the job for your

play15:07

tech stack apply for that job and once

play15:10

you uh complete the vetting process okay

play15:14

you'll find a remote job as we did and

play15:17

then you can work traveling around the

play15:19

world with your family if you wish to

play15:21

right

play15:22

what else uh one more thing if you are

play15:25

enjoying this content please hit the

play15:27

like button that's that's why i know

play15:29

that you are enjoying this content and

play15:31

leave a comment section below if you um

play15:34

leave a message there if you would

play15:36

answer this question in a different way

play15:38

because i like to hear that i i watch i

play15:41

read all the comments and it make me

play15:44

learn too because sometimes i got the

play15:46

comments in the section that are really

play15:48

great and it makes me a better developer

play15:51

and you can help other developer as well

play15:53

okay as that said okay let's go back to

play15:57

our react native interview and also this

play16:01

one is also happens in

play16:03

in react.js as well so so

play16:05

what is the reactive virtual dom okay

play16:08

how how the how does the virtual dom

play16:10

work in uh indirect native

play16:14

basically virtual dom is uh the frequent

play16:16

dom manipulation are expensive uh like

play16:19

we talked about the old for example web

play16:21

concept there is a real dom

play16:23

and there is some computation cause uh

play16:25

to differentiate uh between those uh

play16:28

nodes but but erect introduce our thing

play16:30

that is virtual dom and and the whole

play16:33

rec library based on this virtual dom

play16:35

basically it is a virtual representation

play16:37

of dom in a memory so it's not a real

play16:39

dom it's a the copy of dom it's a

play16:41

virtual dom so it's synced with the real

play16:43

dom with the react dom library uh this

play16:46

process is called reconciliation and

play16:48

react compare the virtual dom and free

play16:50

updated virtual dom and only mark the

play16:52

subtree of component that are updated

play16:55

this process is called differing and the

play16:56

algorithm behind this thing is called

play16:58

disk algorithm and react uh uses keys to

play17:01

avoid unnecessary read

play17:06

using multiple uh state variables probes

play17:08

so it it renders the particular element

play17:12

uh if the uh particular state value is

play17:15

changed for example you are using x y z

play17:17

there are three states uh there and you

play17:20

are uh creating the view by using x y z

play17:22

state and you only update the value of x

play17:25

now

play17:26

due to this virtual dom and the process

play17:28

of reconciliation and using difficult

play17:31

algorithm it only update the node uh and

play17:33

the element x instead of updating wires

play17:36

that that is much competition so it's so

play17:37

it is it's used to more optimize

play17:39

approach uh

play17:41

and that's the beauty of that

play17:43

cool and to be honest

play17:46

i'm blind with you today okay

play17:48

all right so and then i just realized

play17:50

one thing today is uh

play17:53

never mind i was just would say today my

play17:55

birthday but never mind let's go back to

play17:57

our interview okay so uh next question

play18:02

uh can i react native

play18:04

sorry can i react native be used uh i'll

play18:06

say to build application for

play18:08

tv for example uh i've seen a lot of

play18:11

components for

play18:13

that react js uses a lot of components

play18:15

like reactive reactive video so

play18:18

can a react native be used to

play18:21

build search applications for for tv i

play18:23

mean

play18:24

uh technically yes a ragnay despot tv

play18:28

but community support and the better

play18:29

documentation are not uh yet available

play18:32

uh basically tv devices sport has been

play18:35

implemented with the intention of making

play18:37

existing a recognitive application just

play18:39

work on apple tv and android tv with few

play18:42

or no changes are needed in the java

play18:44

code for the application since there are

play18:46

a lot of similarities between ios and tu

play18:49

tv os api it was easy to add tv sport

play18:52

index native but there are not many

play18:54

developers using that native uh for

play18:56

building tv application at one point the

play18:59

communicative was discussing removing it

play19:01

from the core library also people facing

play19:04

a few of the issues or problems while

play19:06

using that native uh to develop tv so in

play19:09

simple what uh basically uh it's support

play19:11

a tv but there is not much better

play19:13

support in terms of community and

play19:15

documentation uh or are you at a video

play19:18

yeah that that is something that we need

play19:20

to improve definitely so basically yes

play19:23

it that supports tv

play19:25

but so you have to discover how to do

play19:28

that because the documentation are not

play19:30

great as the library right

play19:35

all right so

play19:37

okay so we are coming to the end okay

play19:40

uh i just have one more question for you

play19:42

uh

play19:43

this question is

play19:45

uh

play19:46

how could we check okay if you are

play19:48

working for react native application how

play19:51

can we check if the react native app is

play19:54

in debug or is not released built

play19:58

yeah basically the react native

play20:00

already gave out the variable that is

play20:03

environment variable the under

play20:04

underscore uh double dev and double

play20:06

underscore so if that value is true so

play20:08

it means that you are using the debug uh

play20:11

device uh

play20:12

you know application but if that value

play20:14

is false so it means that you are using

play20:16

the release bit

play20:18

cool and what's the best way to debug a

play20:21

react native application

play20:23

uh you can use the if statement that for

play20:25

example uh if uh in the parentheses you

play20:28

can use the underscore underscore dev

play20:30

underscore underscore variable it can be

play20:32

a boolean variable true or false and you

play20:34

can put the statement there like you can

play20:36

put some console uh so and and wrote

play20:39

some block value there and you can check

play20:41

that if the build is in the developer

play20:44

environment then it will be

play20:45

along the console otherwise it will not

play20:48

okay basically what i'm saying is we

play20:50

console uh we console.log

play20:53

whatever we want inside a double uh

play20:56

score debug

play20:58

variable right

play20:59

all right one one last question okay uh

play21:03

is there any way

play21:04

to inspect the

play21:06

the react yes uh direct native app for

play21:10

example if i want to check the

play21:12

the ui why why the title is breaking so

play21:17

is there any way for us to inspect that

play21:20

yeah basically uh you are talking about

play21:22

the debugging we can use a chrome

play21:23

debugger uh you can shake the

play21:25

application or or by uh

play21:28

pressing the command d on the keyboard

play21:30

uh to open the menu and you can click on

play21:32

the chrome debugger then it will open

play21:34

the link uh or under your on your

play21:36

console chrome browser and you can debug

play21:38

your application the javascript code and

play21:40

also some ui logic gear

play21:42

so i have we could use chrome debugger

play21:45

to inspect the ui and also the

play21:47

javascript as well correct yeah totally

play21:49

are used for both purposes okay great so

play21:52

uh as that said that was my last

play21:54

question for you thank you sesame uh it

play21:57

was really nice to speak to you it was

play21:59

my pleasure i learned a lot with you

play22:01

today okay uh and to everybody else

play22:03

thank you for turning this mark

play22:04

interview series uh rio and i hope you

play22:07

enjoyed this interview as much as i did

play22:09

we shared a value of tips here as i

play22:11

mentioned this question was more for

play22:13

youtube purpose if you go to interview

play22:16

you might get some or any some different

play22:19

questions of course and if you are

play22:21

looking for some specific mock interview

play22:23

series uh you can let me know in the

play22:25

comment section below for example we are

play22:27

following you and we are taking the

play22:30

market review as your demand okay uh

play22:34

what else don't forgot to subscribe to

play22:36

our channel like this content if you

play22:38

enjoyed that and we will make we will be

play22:41

back very soon with new episode of

play22:44

touring mock interview series uh till

play22:46

then give us a thumbs up subscribe to

play22:49

our channel follow us on instagram

play22:50

linkedin facebook

play22:52

twitter clubhouse stay close to tuning

play22:55

and i'm pretty much sure that you find

play22:57

the job as we did okay as that said

play23:01

that's a wrap i hope to see you all

play23:03

again in the next video and happy coding

play23:10

you

Rate This

5.0 / 5 (0 votes)

関連タグ
Mock InterviewReact NativeTech LeaderWeb DevelopmentInterview TipsSoftware EngineerJavaScriptMobile AppCareer AdviceRemote Job
英語で要約が必要ですか?