React Native

React Fundamentals

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

20 Interview-Fragen·
Junior
1

What is JSX in React?

Antwort

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?

Antwort

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?

Antwort

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 Interview-Fragen

Meistere React Native für dein nächstes Interview

Zugang zu allen Fragen, Flashcards, technischen Tests, Code-Review-Übungen und Interview-Simulatoren.

Kostenlos starten