Curso React and TypeScript
24hVisão Geral
Este curso de treinamento ensina aos alunos tópicos introdutórios de React com TypeScript.
Objetivo
Após a conclusão deste curso, você será capaz de:
- Aprenda como começar com React e TypeScript
- Trabalhar com componentes
- Saiba mais sobre o ciclo de vida do componente React
- Trabalhar com formulários
- Entenda o roteamento
Pre-Requisitos
- 1-2 anos de experiência em JavaScript. Compreensão avançada de JavaScript, incluindo protótipos e funções como cidadãos de primeira classe.
Informações Gerais
Carga Horária: 24h
- Se noturno este curso é
ministrado de Segunda-feira à sexta-feira, das 19h às 23h
- Se aos sábados este curso é
ministrado das 9h às 18h
- Se in-company por favor
fazer contato para mais detalhes.
Formato de
entrega:
- 100% on-line ao vivo, via
Microsoft Teams na presença de um instrutor/consultor ativo no mercado.
- Nota: não é curso
gravado.
Lab:
- Laboratório + Exercícios
práticos
Materiais
Português | InglêsConteúdo Programatico
Setup
- Verifying Node.js and either NPM or yarn
- Verifying class libraries
- Verifying class files
- Verifying TypeScript setup
- IDE (WebStorm or Visual Studio Code preferred)
Introduction to React
- What problem(s) does React solve?
- Traditional, pre-JS web applications
- Late-model, MV* and JS web applications
- React’s solutions
- Single-page apps
- View libraries
- Helper libraries
- React and TypeScript development environment
- Simplicity: create-react-app and react-scripts-ts
- Build-your-own: an overview
- Configuring TypeScript
- Hello world
- Your first React component
- Using React within a page
- Making some basic changes
- React and JSX and TypeScript
Components
- Two types of components
- Functional components
- Class-based components
- Why use one or the other?
- Testing basic components
- Props and state
- Properties and types
- Passing in properties
- Limitations of properties
- State and types
- Using state
- When to use state, when to use props
- Testing components with Enzyme
- Event handling
- React event handling
- Event types
- Synthetic events
- React vs DOM event handling
- Testing events
- Children
- Component types
- Components within components
- Known children and unknown children
- Testing child components
- Parent-child component communication
- Communication from parent to child
- Communication from child to parent
- Container vs presentational components
- Using types to validate communication
React Component Lifecycle
- Overview
- Startup and mounting
- Deprecated methods
- Updating
- Deprecated methods
- Unmounting
- Calling lifecycle methods in tests
- Error handling and error boundaries
Intermediate component usage
- Asynchronous data
- When should asynchronous fetching be done?
- What challenges does async offer?
- Working with Promises and generic types
- Asynchronous best practices
- Testing against async fetches
- Lists of data
- Iterating over a list
- The key property
- Sorting data
- Testing component interactions
Forms
- Controlled vs uncontrolled components
- Form field types
- What does React know about your form field?
- Does React control your form field?
- When does React find out about changes to your form field?
- Form field types
- Controlling a text field
- Other form fields
- Getting data out of a form
- Working with form data in tests
Introduction to routing
- What problem is routing trying to solve?
- How does routing solve this problem?
- Tying components to URLs
- Passing parameters via the URL
- Routing software
- React-router
- Other routers
- Simple router example
- Routing types
- Testing routing
More complex routing
- Top-level routing
- Routing at the top of your application
- Allowing other parts of the application to manage routing
- Redirects
- React-router objects and their types
- match
- history
- location
- Routing organizational techniques
- Testing advanced routing
Advanced React
- Understanding and optimizing reconciliation
- Best practices for React reconciliation
- Recognizing common issues
- Making improvements
- Refs
- What’s a ref?
- What problem does it solve?
- Ref types
- How can I use refs?
- Testing refs
- Context
- What is the context API?
- Is the context API public?
- How to use the context API
- Context API types
- Testing the context API
Render props
- Rendering in depth
- Rendering a function instead of a prop
- Using the render prop pattern
- Render props, function signatures, and types
- Testing render props