Company
Date Published
Author
Steven Almeroth
Word count
3443
Language
English
Hacker News points
None

Summary

This tutorial guides users through building an app with TypeScript, using the React.js and Next.js frameworks to query the Internet for current crypto-currency price data. The user is first required to set up their environment by installing Node.js, Yarn, and creating a new Next.js app. They then convert the existing JavaScript package to TypeScript, install dependencies, and create a configuration file. After that, they add a form to submit query parameters and write code to call the external API endpoint using async/await syntax. The user is also required to sign up for an API key from RapidAPI to access real-time data. The app uses a combination of HTTP GET and POST requests to retrieve data from the API. Finally, the user annotates variables and functions with types in a global TypeScript Declaration File to improve code readability and maintainability.