An application created with the useState, and useeffect Hook.
To run the application please:
- download the file
- run in terminal npm install to install all the dependences
- hit npm start. The application will run on the localhost:3000.
The app uses api from https://course-api.com/react-tours-project, from which are collected all data used in the project. Api and all basic functionallities are located in App.js in which is also located component.
In Tours.js is coded main component of the site with the title and another div element provided for every component. I used map method to get every id and to add remove button to every tour component.
In Tour.js id, info, image, name, price, removeTour are passed as a prop based on which are created all the visual elements of each component. On click is made the read more section that is a substring of 2000 ch or it can be shown all. Also the delete button is created which functionallyty is set in App.js.
With the use of conditional redering is made loading effect with the use of component from Loading.js