question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How realtime works?

See original GitHub issue

I’m wondering how realtime works. For example, I have a data collection call news. How to monitor it and get notified if there is a new update.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
benwindingcommented, Dec 8, 2020

Hi @kiptoomm, Thanks for the detailed response. One way you can implement that type of realtime update is by refreshing the view, when something in the database changes, here’s an example of the workflow:

  1. Subscribe to a specific collection change in firestore
  2. When the collection changes, refresh the view

Try something like this (this hasn’t been tested):

// On a <List /> view 
import { useRefresh } from "react-admin";
import firebase from 'firebase/app';

import * as firebase from "firebase/app";

const refresh = useRefresh();
// Watch collection
firebase.firestore().collection('my-collection').onSnapshot(a => {
  console.log('my-collection changed!');
  // This refreshes the list view
  refresh();
})

Let me know how it goes, Ben

1reaction
benwindingcommented, Nov 24, 2020

ra-realtime is only available in the premium version of react-admin, closing, will open again if needed https://marmelab.com/ra-enterprise/modules/ra-realtime

Read more comments on GitHub >

github_iconTop Results From Across the Web

What Is Real-Time Processing? A Quick-Start Guide - Learn
Real-time Processing is the continuous processing of incoming data from diverse sources with minimal latency. Learn about Real-time ...
Read more >
Real-Time Data & Analytics - The Complete Guide - Confluent
Learn what real-time data is, how it works, and benefits, with real-life use cases, and real-time data analytics solutions for businesses big and...
Read more >
What is Real-Time Data? | TIBCO Software
How Does Real-Time Data Work? ... Real-time data facilitates ulta-fast, continuous data analytics. There is a short duration from the receiving data, to...
Read more >
Real-time - Wikipedia
A real-time process is generally one that happens in defined time steps of maximum duration and fast enough to affect the environment in...
Read more >
How To Use Real-Time Data? Key Examples And Use Cases
Working with real-time data is often an advanced use case for ... today mean uses are being found for real-time data outside of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found