React Native

React Fundamentals

JSX, components, props, state, events, conditional rendering, lists & keys

20 mülakat soruları·
Junior
1

What is JSX in React?

Cevap

JSX is a syntactic extension of JavaScript that allows writing HTML-like code directly within JavaScript. It gets transpiled into React.createElement() function calls by tools like Babel. JSX makes the code more readable and facilitates UI creation by combining logic and rendering in the same file.

2

How to include a JavaScript expression in JSX?

Cevap

JavaScript expressions are included in JSX by wrapping them in single curly braces. For example, to display a variable name, write {name}. This syntax allows injecting dynamic values, calling functions, or evaluating expressions directly in the component rendering.

3

What is the main difference between a functional component and a class component in React?

Cevap

A functional component is a simple JavaScript function that returns JSX, while a class component extends React.Component and uses a render() method. Since the introduction of Hooks in React 16.8, functional components can handle state and side effects, making class components less necessary in modern projects.

4

What is a prop in React?

5

What is state in React and how does it differ from props?

+17 mülakat soruları

Bir sonraki mülakatın için React Native'de uzmanlaş

Tüm sorulara, flashcards'a, teknik testlere, code review alıştırmalarına ve mülakat simülatörlerine eriş.

Ücretsiz başla