September 2022
Intermediate to advanced
410 pages
10h 7m
English
Now we are going to get our React page to 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. In ...