Step 6 - React tutorial: TSX and ES6

preview_player
Показать описание
### Step 6 in the "React, TypeScript, and TDD" tutorial

Using React and TypeScript means good JSX and ES6 support in the IDE. This section shows some useful features from both.

00:00 - Start
00:20 - Some cleanup
00:50 - Move the label out of the TSX
01:32 - Add a click handler
01:50 - The alert causes a TypeScript error
02:14 - Move click handler to an arrow function, to execute after the click
02:39 - Problems with arrow functions as handlers: hard to test, bad performance
02:43 - Try moving to method (fails due to binding)
03:50 - Use a field property that's an arrow function, fixes the binding
04:14 - Works in browser
04:25 - Show some TSX things such as className
05:20 - Let the IDE help on navigation, usages, refactoring

More on this tutorial step:
The rest of this "React, TypeScript, and TDD" tutorial:
See tips, tutorials, and more in the PyCharm Guide:
Рекомендации по теме
visit shbcf.ru