ShinnoT / priti-wiki

A prettier wikipedia :nail_care:
0 stars 0 forks source link

Getting user input from text field #1

Open ShinnoT opened 5 years ago

ShinnoT commented 5 years ago

About

Possible steps

ShinnoT commented 5 years ago

I started this for you - if you check Home.js file you will see how I save the user input in the component state and onSubmit is where you would start writing your logic --> onSubmit function is triggered when user hits enter

ShinnoT commented 5 years ago

open your browser inspector and check the console, when you type something in the search field of the website and hit enter, it should display in the console what you just typed. instead of just logging it, now your job is to use the user input value and call the api to actually search wikipedia

ShinnoT commented 5 years ago

sorry, shouldve included pics on what im talking about. here you go: image as you can see if i type something and hit enter (submit), then it displays it on the console, but instead of displaying the user input, we want to do something with it. in this case call the api to search for wikipedia articles with the users search query (the user input)