Skip to Main Content
React, 2nd Edition
book

React, 2nd Edition

by Nils Hartmann, Oliver Zeigermann
December 2019
Intermediate to advanced content levelIntermediate to advanced
402 pages
9h 14m
German
dpunkt
Content preview from React, 2nd Edition

11React-Anwendungen mit TypeScript

In diesem Kapitel zeigen wir dir, wie du React-Anwendungen typsicher mit TypeScript entwickeln kannst. Falls du TypeScript noch nicht kennst, findest du in Anhang D eine Einführung in die Sprache, die auf JavaScript aufbaut und schnell zu erlernen ist.

11.1Hands-on: eine React-Anwendung mit TypeScript

In diesem Hands-on-Teil entwickeln wir erneut eine Hello-World-Komponente, die einen Gruß ausgibt (siehe Abb. 11–1). Diesmal werden wir die Komponente allerdings mit TypeScript-Typen versehen. Die Komponente enthält ein Eingabefeld, eine Checkbox und einen Button. Wird auf den Button geklickt, wird der im Eingabefeld eingegebene Gruß ausgegeben. Ist die Checkbox (»Add Phrase«) angehakt, wird dem Gruß noch ein »Hello« ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning React, 2nd Edition

Learning React, 2nd Edition

Alex Banks, Eve Porcello
React Key Concepts

React Key Concepts

Maximilian Schwarzmüller

Publisher Resources

ISBN: 9781098123857