React and ActionCable
This lesson will explore how to use React and ActionCable.
We'll cover the following
Currently, our concert show page makes a fetch call to the server to determine the current status of the seats on the page. It also makes a POST call to put a seat on hold after we click on it. We can replace both these calls with a single ActionCable subscription. This is a minimalist security setup, but we’ll keep it simple for the purposes of this course.
ConcertChannel on the server
On the server-side, we need to create a new ActionCable channel. This one will have the same subscribe
method as our previous channel, but we need to add a method for our client-side to reserve a ticket:
Get hands-on with 1400+ tech skills courses.