CASS Training
latest
Git Training
Git
Javascript
Javascript
React Training
React/TypeScript Training
Best Practices
.Net Core
.Net Core
CASS Training
Docs
»
Javascript
Edit on GitHub
Javascript
ΒΆ
Javascript Training
React Training
React/TypeScript Training
Links
User interfaces on the web
On the maintainability of JavaScript
Setting up your React/TypeScript project
NPM configuration
TypeScript compiler configuration
Your first React element
React Components
Using Props
Using State
Putting it all together
Props and state are immutable
Handling events
Adding an item
Looking forward
Growing complexity
A parent component's state is a child component's prop
State management
Best Practices
Contents
JavaScript
Stop using
var
Use object shorthand notation
Use string templates
ESNext
async/await
Object
spread/rest
Class fields and static properties
Component class skeleton
prop-types
Example (class using ESNext static property support)
Example (stateless functional component)
Use destructuring to import specific prop types
Using object shapes and arrays
Custom prop types: sharing your shapes
Specifying default prop values
Stateless Functional Components
Example
Simple snapshot testing
Containers
Example
Higher Order Components
Example: IP address
Example: language
Chaining HOCs
Functions as Children
Events
Binding events
Sharing event handlers
Handling the ENTER key in a form
Conditional Rendering
Store the JSX in a variable
Ternaries
Logical && operator shortcut
Return null from your render method
Hide your component using CSS
Arrays
Keys
Writing Components
Designing a Button component
More requirements
Even more requirements!
Composition to the rescue
Summary
Unit Testing
Snapshot testing
DOM testing
State
State updates may be asynchronous!
Immutable data
Props
Destructuring
Don't pass on unknown props
Pure Components
Project Structure
Summary
Read the Docs
v: latest
Versions
latest
Downloads
pdf
htmlzip
epub
On Read the Docs
Project Home
Builds
Free document hosting provided by
Read the Docs
.