Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda React Native Project Structure | Introduction to React Native
React Native Fundamentals

React Native Project Structure

Deslize para mostrar o menu

When you create a React Native project, you'll see several files and folders. At first, this structure may look confusing, but each part has a specific purpose.

One of the most important files is App.js. This is the main component of your application and the place where your app starts running. As your project grows, App.js often becomes a container that loads other screens and components.

You will also find folders such as components and assets. The components folder is used to store reusable pieces of your user interface, such as buttons, cards, or headers. The assets folder contains static files like images, icons, and fonts.

Another important file is package.json. It contains information about your project and keeps track of the libraries and dependencies your app uses. The node_modules folder stores those libraries after they are installed.

React Native projects also include android and ios folders. These contain platform-specific files and settings. Most of the time, you won't need to work directly with them because you'll build your app using JavaScript and React Native components.

The application starts from a file called index.js. This file tells React Native which component should be loaded first. In most projects, it loads and registers the App component.

As your app grows, it's a good practice to split your interface into smaller components and store them in the components folder. This keeps your code organized, easier to maintain, and easier to reuse throughout the project.

question mark

Which file is typically the entry point in a React Native project?

Selecione a resposta correta

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 2

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

Seção 1. Capítulo 2
some-alt