June 2021
Intermediate to advanced
398 pages
9h 35m
English
Now we are going to get our React page to also interact by making API calls to server. When last we left our React page in Dynamic Styled Components, it was displaying the seating information for one specific concert. What we’d like it to do now is get that seating information from the server and update it if it changes. This will use the fetch method we’ve already seen, as well as a new React hook called useEffect.
Updating the seating information involves adding the following features to the page:
When the React components load, they need to get the current seating status from the server.
That status needs to get passed down from the Venue component to the seat component that uses the status to display. ...