...
This file is a TypeScript React file, which allows it to use normal TypeScript as well as HTML tags. Read through the file and try to get a general understanding (don’t worry if it doesn’t make any sense, our React Learning Session is next Monday). In this file, your goal is to find the "names" array and add a new entry containing your name and favorite color to the end of it!
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
TypeScript is built off of JavaScript, which uses JSON. Here’s a 1 minute video explaining how JSON works. Here’s a quick article explaining the basics. In TypeScript, we are able to add a type annotation to a JSON object to enforce the right type. A declaration of a variable might look like this: |
...
|
...
|
...
In this example, |
Using the above information, you should be able to add another entry to the names
array in the file.
Once you’re done, save the file. To view your changes, go to your terminal and run yarn install
and then yarn start
. This will start the website at localhost:3000
. Go to your browser and enter the url localhost:3000/credits
. If you get stuck along the way make sure to ask any questions in slack!
...
Committing Your Code
Once you’ve completed your ticket and are ready to submit what you have for review, go back into your command line, make sure you are still on the right branch by running git branch
, and run the command git add .
which will save all the changes you've made, then run git commit -m '#YourIssueNumber Added my name to credits'
Once you've committed your work, you must push it to the remote site by entering git push
.
...