Skip to Main Content
Modern Front-End Development for Rails, 2nd Edition
book

Modern Front-End Development for Rails, 2nd Edition

by Noel Rappin
September 2022
Intermediate to advanced content levelIntermediate to advanced
410 pages
10h 7m
English
Pragmatic Bookshelf
Content preview from Modern Front-End Development for Rails, 2nd Edition

Adding Asynchronous Events to Contexts

With all of that out of the way, we can add the ActionCable subscription back to the system, but we have a logistical problem to deal with first.

The logistical problem is that the ActionCable subscription needs to both be global and have external access to the existing VenueContext reducer. It needs to be global because multiple components may need access to the subscription data. But it also needs to be external from the VenueContext because the ActionCable subscription uses the concert_id, which is now stored as data in the state. But it will also need to use the dispatch function because the subscription receives data about what tickets have been held from the ActionCable channel, and it will need to ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Modern Front-End Development for Rails

Modern Front-End Development for Rails

Noel Rappin

Publisher Resources

ISBN: 9781680509977Errata Page