Skip to content

xXm4ntr4Xx/movie-app-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Practicing React js The key point of this exercise are:

1.create a react app

Screenshot 2022-03-20 at 00 27 17

2.useState and useEffect -1 (movies,setMovies) where we store the data retreived from the API,

Screenshot 2022-03-20 at 00 35 07

Screenshot 2022-03-20 at 00 35 29

-2(movieName,setMoviename) we set the value to be the 'movieName' by calling the setMovieName to be the value in the input text

Screenshot 2022-03-20 at 00 36 21

  1. on the button we call the search movie function with the onclick function and after we reset the input text after the click using an empty string

Screenshot 2022-03-20 at 00 38 27

4.we create a conditional statement to show 2 different divs. -if there are contents show the div containing the movie if there are not movie available show a div with a message 'No movie found'

Screenshot 2022-03-20 at 00 40 40

5.IMPORTANT -use the question mark to avoid error when element are not found on the api. Without using the question mark when no element are founded will cause the website to crash,returning an empty page with no element

Screenshot 2022-03-20 at 00 45 59

-here the definition of (optional chaining)

Screenshot 2022-03-20 at 00 46 47

  1. Create component and pass data down as props

Screenshot 2022-03-20 at 00 49 02

7.Destructure the element from the Api down to the component

Screenshot 2022-03-20 at 00 52 33

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published