Skip to Main Content
React Projects
book

React Projects

by Roy Derks
December 2019
Intermediate to advanced content levelIntermediate to advanced
474 pages
10h 3m
English
Packt Publishing
Content preview from React Projects

Handling foreground notifications

Handling notifications when the application is foregrounded is more complex, and requires us to add a listener that checks for new notifications and afterward, these notifications should be stored somewhere. Expo's Notifications API has a listener available that can help you to check for new notifications, while the notifications can be stored using Apollo by having a local state. This local state extends the data returned by the GraphQL server by adding any new notifications that were found by the listener.

When the notifications are stored in the local state, this data can be queried and shown in either a component or a screen in your application. Let's create a notifications screen that will display these ...

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

React Projects - Second Edition

React Projects - Second Edition

Roy Derks
Test-Driven React

Test-Driven React

Trevor Burnham

Publisher Resources

ISBN: 9781789954937Supplemental Content