PubNub Product Updates

PubNub EON, Real-time Dashboard Framework in React

1 min read Syed Ahmed on Jun 18, 2018
Try PubNub Today

Free up to 1MM monthly messages. No credit card required.

Subscribe to our newsletter

By submitting this form, you are agreeing to our Terms and Conditions and Privacy Policy.

We're pleased to announce our new component library for EON that makes it even easier to start integrating PubNub and real-time charts and dashboards into your React app!

We’re pleased to announce our new component library for EON that makes it even easier to start integrating PubNub with real-time dashboards and charts into your React app! With this library you can do things like:

Currently, we’re providing support for charts, with the goal to add maps down the line. The component library is completely open source, so contributing is encouraged. Head over to the GitHub to add on.

So How Does It Work?

The implementation is actually very simple. We need three main things.

  1. A PubNub Instance which is subscribed and listening to a channel
  2. EON-React Library
  3. Chart component

The library takes care of all the heavy lifting for you to show the chart a component.

If you need example code snippets you can check it out over here.

Let’s Get Coding: A Quick Example

You’ll first have to sign up for a PubNub account to get your unique pub/sub keys.

Then, create a basic skeleton

npx create-react-app Eon-React-Demo

Get the required libraries.

import PubNubReact from 'pubnub-react';
import Chart from 'eon-react';

Initialize our PubNub object.

this.pubnub  =  new PubNubReact({
      subscribeKey:  'demo' // Your sub key
    });
this.pubnub.init(this);

Create our react component.

render() {
    return ( 
      <Chart
        pubnub={this.pubnub}
        channels={['eon-components']} /** Enter your channel name **/
        type='area-line' />
    );
  }

More from PubNub

How to Add a Notification Badge to Icons in React Native
Real-time Chat BlogDec 19, 20226 min read

How to Add a Notification Badge to Icons in React Native

Display real-time notification badges with PubNub and React Native to display important information and bring users back to your...

Michael Carroll

Michael Carroll

Digital Twins and the Future of Real-Time Data
InsightsDec 6, 20224 min read

Digital Twins and the Future of Real-Time Data

The concept of Digital Twins has evolved over the last two decades, however, one thing remains the same: the need for real-time...

Michael Carroll

Michael Carroll

How Many Text Characters Fit in a 32KB PubNub Message?
Real-time Chat BlogNov 24, 20224 min read

How Many Text Characters Fit in a 32KB PubNub Message?

Learn the ins-and-outs of PubNub message size and get a better idea of how many text characters fit in a single message.

Michael Carroll

Michael Carroll