You'll be creating more complicated custom components than a simple button in the near future, but we all gotta start somewhere. But much of the power that React provides to us developers is being able to create our own components and reuse them. In the previous exercise, we used the HTML tag. Take note that capturing events such as clicks is done differently in React than it is in JavaScript. Using the native HTML tag, capture the click event and alert the message, "Clicked!". This exercise gets you started with event handling, which is a basic concept not only in React but also in JavaScript (which is again another pre-requisite before learning React). Of course, there's more to web apps than capturing clicks, but it's important to start from the basics. What makes a web app different from a static website? A web app is interactive. Inside the square, render "Hello, World!". Start by rendering a square with a background color. This will asses if you actually know HTML, which is one of the many prerequisites before learning React. ![]() So let's get started! React JS Coding Challenges Exercise 1: Hello World!Įvery programming language starter tutorial teaches you how to output "Hello, World!" using the language.īut this exercise is not just for tradition. Then you can start learning more advanced concepts, and build more complicated projects. ![]() ![]() Once you finish all exercises, you'll know you've got the basics down. These exercises will help you apply the basic concepts of React through tiny projects. That's what this post is for, which is inspired by the post, "12 Exercises to Learn React Native". Well, what if you're not that far into your journey, and still aren't able to build full-blown projects? You know what they say, if you REALLY want to learn React, build something! Don't get stuck in tutorial hell.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |