React Native

React Fundamentals

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

20 면접 질문·
Junior
1

What is JSX in React?

답변

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?

답변

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?

답변

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 면접 질문

다음 면접을 위해 React Native을 마스터하세요

모든 질문, flashcards, 기술 테스트, 코드 리뷰 연습, 면접 시뮬레이터에 접근하세요.

무료로 시작하기