Coder Social home page Coder Social logo

react's Introduction

PubNub React Framework

This is the official PubNub React framework repository.

PubNub takes care of the infrastructure and APIs needed for the realtime communication layer of your application. Work on your app's logic and let PubNub handle sending and receiving data across the world in less than 100ms.

Requirements

To use the PubNub React framework, you need:

This library is compatible with the latest versions of the React Native framework. For examples, refer to examples/reactnative.

Get keys

You will need publish and subscribe keys to authenticate your app. Get your keys from the Admin Portal.

Sample app

Follow these instructions to set up a simple chat app using PubNub.

Note: These instructions assume you're using JavaScript. If you'd prefer to use TypeScript, follow the instructions in the React framework documentation.

  1. Set up your React project.

    For a quick single-page app, create-react-app is a good starting point:

    npx create-react-app react-sample-chat
  2. Add the PubNub JavaScript SDK and React framework packages to your project:

    cd react-sample-chat
    npm install --save pubnub pubnub-react
  3. Replace the contents of src/App.js with the following, replacing myPublishKey and mySubscribeKey with your own keys, and myUniqueUUID with a value of your choice:

    import React, { useState, useEffect } from 'react';
    import PubNub from 'pubnub';
    import { PubNubProvider, usePubNub } from 'pubnub-react';
    
    const pubnub = new PubNub({
      publishKey: 'myPublishKey',
      subscribeKey: 'mySubscribeKey',
      uuid: 'myUniqueUUID'
    });
    
    function App() {
      return (
        <PubNubProvider client={pubnub}>
          <Chat />
        </PubNubProvider>
      );
    }
    
    function Chat() {
      const pubnub = usePubNub();
      const [channels] = useState(['awesome-channel']);
      const [messages, addMessage] = useState([]);
      const [message, setMessage] = useState('');
    
      const handleMessage = event => {
        const message = event.message;
        if (typeof message === 'string' || message.hasOwnProperty('text')) {
          const text = message.text || message;
          addMessage(messages => [...messages, text]);
        }
      };
    
      const sendMessage = message => {
        if (message) {
          pubnub
            .publish({ channel: channels[0], message })
            .then(() => setMessage(''));
        }
      };
    
      useEffect(() => {
        pubnub.addListener({ message: handleMessage });
        pubnub.subscribe({ channels });
      }, [pubnub, channels]);
    
      return (
        <div style={pageStyles}>
          <div style={chatStyles}>
            <div style={headerStyles}>React Chat Example</div>
            <div style={listStyles}>
              {messages.map((message, index) => {
                return (
                  <div key={`message-${index}`} style={messageStyles}>
                    {message}
                  </div>
                );
              })}
            </div>
            <div style={footerStyles}>
              <input
                type="text"
                style={inputStyles}
                placeholder="Type your message"
                value={message}
                onKeyPress={e => {
                  if (e.key !== 'Enter') return;
                  sendMessage(message);
                }}
                onChange={e => setMessage(e.target.value)}
              />
              <button
                style={buttonStyles}
                onClick={e => {
                  e.preventDefault();
                  sendMessage(message);
                }}
              >
                Send Message
              </button>
            </div>
          </div>
        </div>
      );
    }
    
    const pageStyles = {
      alignItems: 'center',
      background: '#282c34',
      display: 'flex',
      justifyContent: 'center',
      minHeight: '100vh',
    };
    
    const chatStyles = {
      display: 'flex',
      flexDirection: 'column',
      height: '50vh',
      width: '50%',
    };
    
    const headerStyles = {
      background: '#323742',
      color: 'white',
      fontSize: '1.4rem',
      padding: '10px 15px',
    };
    
    const listStyles = {
      alignItems: 'flex-start',
      backgroundColor: 'white',
      display: 'flex',
      flexDirection: 'column',
      flexGrow: 1,
      overflow: 'auto',
      padding: '10px',
    };
    
    const messageStyles = {
      backgroundColor: '#eee',
      borderRadius: '5px',
      color: '#333',
      fontSize: '1.1rem',
      margin: '5px',
      padding: '8px 15px',
    };
    
    const footerStyles = {
      display: 'flex',
    };
    
    const inputStyles = {
      flexGrow: 1,
      fontSize: '1.1rem',
      padding: '10px 15px',
    };
    
    const buttonStyles = {
      fontSize: '1.1rem',
      padding: '10px 15px',
    };
    
    export default App;
  4. In your project, run the following command:

    npm start

    You should see the following in your browser: chat UI screenshot

Add listeners

In the code in the previous section, the following adds a message listener in the Chat() function:

      useEffect(() => {
        pubnub.addListener({ message: handleMessage });
        pubnub.subscribe({ channels });
      }, [pubnub, channels]);

Publish and subscribe

Publishing a message:

const [channels] = useState(['awesome-channel']);

// ...

const sendMessage = message => {
  if (message) {
    pubnub
      .publish({ channel: channels[0], message })
      .then(() => setMessage(''));
  }
};

Subscribing to a channel:

const [channels] = useState(['awesome-channel']);

// ...

useEffect(() => {
  pubnub.addListener({ message: handleMessage });
  pubnub.subscribe({ channels });
}, [pubnub, channels]);

Documentation links

Reference information

PubNubProvider

The PubNubProvider makes available a PubNub client instance to a React component tree. You instantiate the provider as follows (note that this example assumes that your publish and subscribe keys are contained in the pubnub.config.json file):

import PubNub from 'pubnub';
import { PubNubProvider } from 'pubnub-react';

const pubNubConfig = require('./pubnub.config.json');
const pubNubClient = new PubNub(pubNubConfig.Demo.keySet);

const App = () => {
  return (
    <PubNubProvider client={pubNubClient}>
      <MyRootComponent />
    </PubNubProvider>
  );
};

export default App;

PubNubProvider props

The PubNubProvider component takes a single prop:

  • client is the required pubNubClient instance. This is used by all components that require PubNub functionality.

usePubNub hook

The PubNub hook lets you interact with PubNub in function components.

Hooks are a new feature added in React 16.8 that allow you to use React features without writing a class. For a general overview of hooks, refer to the React documentation.

Example usePubNub hook usage

import React, { useState, useEffect } from 'react';
import { usePubNub } from '../../src/index';

const PubNubTime = () => {
  const client = usePubNub();
  const [time, setTime] = useState(null);
  const [error, setError] = useState(error);

  useEffect(() => {
    client
      .time()
      .then(({ timetoken }) => {
        setTime(timetoken);
      })
      .catch(error => {
        setError(error);
      });
  }, []);

  if (error !== null) {
    return <div>An error has occured: {error.message}</div>;
  }

  if (time === null) {
    return <div>Loading...</div>;
  }

  return <div>Current time: {time}</div>;
};

export default PubNubTime;

Then, to load PubNubTime on-demand, you could use React.Lazy and Suspense:

import React, { Suspense, lazy } from 'react';

const MyRootComponent = () => {
  const DisplayPubNubTime = lazy(() => import('./PubNubTime'));

  return (
    <Suspense fallback={<div>Loading. . .</div>}>
      <DisplayPubNubTime />
    </Suspense>
  );
};

export default MyRootComponent;

PubNubConsumer

The PubNubConsumer allows you to access the client instance you made available with a PubNubProvider.

Note: Be careful, as the children function will be called every time component rerenders. Wrap components using PubNubConsumer using React.memo to prevent this behaviour.

PubNubConsumer props

The PubNubConsumer component takes a single prop:

  • client is the required PubNub Client instance. This is used by all components that require PubNub functionality.

Example PubNubConsumer usage

Once you've created a PubNubProvider, you can access the client with a PubNubConsumer.

import React from 'react';
import PubNub from 'pubnub';
import { PubNubProvider } from '../PubNubProvider';
import { PubNubConsumer } from '../PubNubConsumer';
import { getPubNubContext } from '../PubNubContext';

const pubNubConfig = require('../config/pubnub.json');
const pubNubClient = new PubNub(pubNubConfig.Demo.keySet);

const App = () => {
  return (
    <PubNubProvider client={pubNubClient}>
      <PubNubConsumer>
        {client => 'success!' /* do something now */}
      </PubNubConsumer>
    </PubNubProvider>
  );
};

Support

If you need help or have a general question, contact [email protected].

react's People

Contributors

are-pubnub avatar client-engineering-bot avatar crimsonred avatar darryncampbell-pubnub avatar davidnub avatar elvis-pn avatar manuelfernando avatar maxpresman avatar messagingmoore avatar mohitpubnub avatar parfeon avatar qsdkresimir avatar qsoftdevelopment avatar salet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react's Issues

Event listener with redux global state

I'm trying to update a global redux state with pubnub events, but cannot, as the event listener does not recognize a redux-based global state variable even though, oddly, it can update the state. Here's my pseudo-code:

const MyComponent = () => {
  const {messages} = useSelector(state => state.chatstore)
  const dispatch = useDispatch();
  useEffect(() => {
    pubnub.subscribe(channels)
    pubnub.addEventListener(pubnubListener)
  }, [pubnub, channels])

  const pubnubListener = event => {
    const {message} = event
    console.log(messages) // returns nothing! I can't do any logic here related to all accumulated messages
    dispatch({type: ADD_MESSAGE, message: newMessage}) // This works, and...
      // ...I can do something with all messages within the reducer after dispatching
  }

  return (
    <div>
    {messages.map(message => <p key={message.id}>{message}</p>)}
    </div>
  )

}

Example code problems

So I'm using pubnub v2, and the code is pretty much the same as the example code, except every time the component renders, the client.addListener code gets run, so it keeps adding listeners and subscribing to the channels. How can I remove the client away from the render portion?

Error when trying to render messages from PubNub Debug Console

I wrote essentially what was in the README file:

export default class PubNubComponent extends Component {
  constructor(props) {
    super(props);
    this.pubnub = new PubNubReact({
      publishKey: "---",
      subscribeKey: "---"
    });
    this.pubnub.init(this);
  }

  componentWillMount() {
    this.pubnub.subscribe({
      channels: ["demoKit-channel"],
      withPresence: true
    });

    this.pubnub.getMessage("demoKit-channel", msg => {
      console.log("GET MESSAGE: ");
      console.log(msg);
    });

    this.pubnub.getStatus(st => {
      console.log("PUBLISH MESSAGE: ");
      console.log(st);
      this.pubnub.publish({
        message: "Published message from the DemoKit Frontend!",
        channel: "demoKit-channel"
      });
    });
  }

  componentWillUnmount() {
    this.pubnub.unsubscribe({ channels: ["demoKit-channel"] });
  }

  render() {
    const messages = this.pubnub.getMessage("demoKit-channel");
    return (
      <div>
        <ul>
          {messages.map((m, index) => <li key={"msg" + index}>{m.message}</li>)}
        </ul>
      </div>
    );
  }
}

render(<PubNubComponent />, document.getElementById("app"));

When I load my site I see the message "Published message from the DemoKit Frontend!"

However, if I go to the Debug Console in my PubNub account and try to send: {"message":"Remote Message"} as a client with the same channel name I get the following error in my browser console:

Error: Objects are not valid as a React child (found: object with keys {message}). If you meant to render a collection of children, use an array instead.
    in li (created by PubNubComponent)
    in ul (created by PubNubComponent)
    in div (created by PubNubComponent)
    in PubNubComponent

I'm not sure how to get it to properly render messages published by the debug console.

Thanks!

React Native Push Notifications documentation issue

Hello, PubNub team!
My team wants to use PubNub to implement it in our project.
I've been following this documentation to set it up in React Native application:
https://www.pubnub.com/blog/react-native-push-notifications-ios-android/

The issue is that I get the error when I use the code from the example:

this.pubnub = new PubNubReact({
        publishKey: 'YOUR_PUBNUB_PUBLISH_KEY_HERE',
        subscribeKey: 'YOUR_PUBNUB_SUBSCRIBE_KEY_HERE'
    });
    this.pubnub.init(this);

TypeError Object is not a constructor (evaluating new_pubnubReact.default')

It seems that the documentation is outdated.
My main goal right now is to make it work with remote push notifications for iOS and Android.
What would be the correct way to do this?
I would love to get a code example that would cover my issue.

I want PubNub to work along with react-native-push-notification library, so I am using it in the NotificationManager class like so:

class NotificationManager {
  constructor() {
    this.pubnub = new PubNubReact({
        publishKey: '--',
        subscribeKey: '--'
    });
    this.pubnub.init(this);
    PushNotification.configure({
      onRegister: function(token) {
          console.log( 'TOKEN:', token );
          if (token.os == "ios") {
            this.pubnub.push.addChannels(
            {
              channels: ['notifications'],
              device: token.token,
              pushGateway: 'apns'
            });
            // Send iOS Notification from debug console: {"pn_apns":{"aps":{"alert":"Hello World."}}}
          } else if (token.os == "android"){
            this.pubnub.push.addChannels(
            {
              channels: ['notifications'],
              device: token.token,
              pushGateway: 'gcm' // apns, gcm, mpns
            });
            // Send Android Notification from debug console: {"pn_gcm":{"data":{"message":"Hello World."}}}
          }  
      }.bind(this),
...

Versions:
"pubnub": "^4.27.5",
"pubnub-react": "^2.0.0",
"react": "16.9.0",
"react-native": "0.61.5",

How do I show messages after refresh?

I set up according to readme however when I refresh messages are not shown. I use const messages = this.pubnub.getMessage('test') to retrieve the messages.

I made sure I am subscribing to the same channel I am sending to. Additionally my pubnub account shows no messages sent.

I am sure I am missing something silly I just cannot seem to figure out what it is. Thanks in advance!

Timer period warning with ReactNative

Hi,
using pubnub (4.13.0) and pubnub-react (1.0.1) together with react-native (0.47.1) I get 2 warnings:

Setting a timer for a long period of time, i.e. multiple minutes, is a performance and correctness issue on Android as it keeps the timer module awake, and timers can only be called when the app is in the foreground. See facebook/react-native#12981 for more info.
08-07 09:37:24.096 5312 5350 W ReactNativeJS: (Saw setTimeout with duration 310000ms)

and

Setting a timer for a long period of time, i.e. multiple minutes, is a performance and correctness issue on Android as it keeps the timer module awake, and timers can only be called when the app is in the foreground. See facebook/react-native#12981 for more info.
08-07 09:37:24.102 5312 5350 W ReactNativeJS: (Saw setInterval with duration 149000ms)

Npm 4 High severity vulnerabilities

Greetings,

I just installed the package but it gave the warning written on the title.

PATH: pubnub-react => pubnub => superagent-proxy => proxy-agent => pac-proxy-agent => https-proxy-agent

NPM Advisory: https://npmjs.com/advisories/1184

But my question is, is it safe to proceed using the react sdk of pubnub?

remove .babelrc from production build

hello, I was getting a TransformError when trying to use this library with create-react-native-app. Removing the .babelrc file from the package solved the issue. Could someone push this fix to production?

User metadata with history call

When I use the pubnub history call I only recieve the timetoken and message. The usermetadata that was sent along with the message is stripped out. Is there anyway around this?

I do not understand how you would seperate messages with inbound strategy if history is built this way.

Thanks for your help

React tutorial StrictMode doubles all messages / removeListener seems to be broken

The current React tutorial using create-react-app puts in index.js which causes all class initiators to be executed twice. The tutorial doesn't cleanup subscriptions / listeners in its UseEffect calls so you end up with duplicate listeners and every message is shown twice in the demo app. The code below exhibits the problem with StrictMode on, but doesn't with it off.

import React, { useState, useEffect } from 'react';
import PubNub from 'pubnub';
import { PubNubProvider, usePubNub } from 'pubnub-react';

const pubnub = new PubNub({
  publishKey: 'pub-c-816a2df2-0f37-44ac-a43e-132a1f7f3672',
  subscribeKey: 'sub-c-4cf98958-0607-4897-a543-07f0daa97aa1',
  userId: 'f8681796-a1d7-4b3e-823b-67944a5c035d',
  // logVerbosity: true,
});

function App() {
  return (
    <PubNubProvider client={pubnub}>
      <Chat />
    </PubNubProvider>
  );
}

function Chat() {
  const pubnub = usePubNub();
  const [channels] = useState(['awesome-channel']);
  const [messages, addMessage] = useState([]);
  const [message, setMessage] = useState('');

  const handleMessage = event => {
    const message = event.message;
    if (typeof message === 'string' || message.hasOwnProperty('text')) {
      const text = message.text || message;
      addMessage(messages => [...messages, text]);
    }
  };

  const sendMessage = message => {
    if (message) {
      pubnub
        .publish({ channel: channels[0], message })
        .then(() => setMessage(''));
    }
  };

  useEffect( () => {
    console.log("updating pubnub")
    console.log(handleMessage)
    pubnub.addListener({ message: handleMessage });
    return () => {
      console.log("cleanup listener")
      pubnub.removeListener(handleMessage)
    }
  }, [pubnub])

  useEffect(() => {
    console.log("Updating channels or pubnub")
    console.log(channels)
    pubnub.unsubscribeAll()
    pubnub.subscribe({ channels });
    return () => {
      console.log("cleanup channels")
      pubnub.unsubscribeAll()
    }
  }, [pubnub, channels]);

  return (
    <div style={pageStyles}>
      <div style={chatStyles}>
        <div style={headerStyles}>React Chat Example</div>
        <div style={listStyles}>
          {messages.map((message, index) => {
            return (
              <div key={`message-${index}`} style={messageStyles}>
                {message}
              </div>
            );
          })}
        </div>
        <div style={footerStyles}>
          <input
            type="text"
            style={inputStyles}
            placeholder="Type your message"
            value={message}
            onKeyPress={e => {
              if (e.key !== 'Enter') return;
              sendMessage(message);
            }}
            onChange={e => setMessage(e.target.value)}
          />
          <button
            style={buttonStyles}
            onClick={e => {
              e.preventDefault();
              sendMessage(message);
            }}
          >
            Send Message
          </button>
        </div>
      </div>
    </div>
  );
}

const pageStyles = {
  alignItems: 'center',
  background: '#282c34',
  display: 'flex',
  justifyContent: 'center',
  minHeight: '100vh',
};

const chatStyles = {
  display: 'flex',
  flexDirection: 'column',
  height: '50vh',
  width: '50%',
};

const headerStyles = {
  background: '#323742',
  color: 'white',
  fontSize: '1.4rem',
  padding: '10px 15px',
};

const listStyles = {
  alignItems: 'flex-start',
  backgroundColor: 'white',
  display: 'flex',
  flexDirection: 'column',
  flexGrow: 1,
  overflow: 'auto',
  padding: '10px',
};

const messageStyles = {
  backgroundColor: '#eee',
  borderRadius: '5px',
  color: '#333',
  fontSize: '1.1rem',
  margin: '5px',
  padding: '8px 15px',
};

const footerStyles = {
  display: 'flex',
};

const inputStyles = {
  flexGrow: 1,
  fontSize: '1.1rem',
  padding: '10px 15px',
};

const buttonStyles = {
  fontSize: '1.1rem',
  padding: '10px 15px',
};

export default App;

Notice I've tried to cleanup the example to fix this, first by ensuring channels aren't double-subscribed and then by splitting the listener part of useEffect into its own call with a cleanup function, but I haven't succeeded. Are there any more detailed docs on removeListener? It doesn't seem to have any effect for me.

Consider a different API

The API for pubnub react is at odds with standard react patterns. For that reason I find myself using the JS SDK and ignoring this package, and wishing it were something different. This is what I wish this package did:

  • Initialize PubNub in a more standard way, so it can be moved to a startup script. The way it's initialized in the constructor and ties in with the class (in mysterious ways) is strange, and doesn't work with pure functions. I'm also confused about how to use it in separate components. Do I instantiate it once per component?
  • Use react context, and provide a PubNubProvider Provider component (accepts initiated pubnub instance) and withPubNub consumer
  • withPubNub provides standard PubNub API functions, like subscribe, publish, etc...
  • When subscribed, withPubNub initializes a listener behind the scenes and passes message data in as props

I don't really expect that this will be implemented, but thought it might be useful feedback, and would make this much more intuitive to react and react native developers.

Better documentation

Can you please add a documentation or quickstart guide?
Any working example would help.

I tried looking through the source code but think it's counterproductive to try reverse-engineering this to understand how it works?.

related to #10

How is the stack related to this.pubnub.init(this)

Hey guys, I'm trying to use pubnub, but having some problems of it not being accessible across different components. The way my app is set up is (using react navigation 4.x) I have
An App container,
A switch navigator between Auth stack, and a bottom tab navigator. I don't want to preemptively create a pubnub object so I don't pass it to the app container (and I also don't have the users credentials then to set the UUID). Instead, I initialize it in one of the tabs (components) in the bottom tab navigator, and then store it in redux. However, it does not work in other components, unless I run init(this) again in that components state. Is this fine to do?

Store does not have a valid reducer. react-native

I have been trying to integrate pubnub on a react-native application using redux. the official documentation is too much buggy and not complete for a new user.

here is my code whic is according to the official documentation

below is my code
import { combineReducers } from 'redux';
import PubNub from 'pubnub';
import { createNetworkStatusReducer, createMessageReducer, createPresenceReducer, createUserReducer, createSpaceReducer, createMembershipReducer, createMembersReducer, createPubNubListener, } from 'pubnub-redux';
import { createStore, applyMiddleware } from 'redux'; import ReduxThunk from 'redux-thunk'; import ChatReducer from './ChatReducer'
const pubnub = new PubNub({ subscribeKey: "sub-c*****", publishKey: "pub-c*****", uuid: "0" });
export let rootReducer = combineReducers( createNetworkStatusReducer, createMessageReducer(), createPresenceReducer(), createUserReducer(), createSpaceReducer(), createMembershipReducer(), createMembersReducer() );

let thunkArgument = { pubnub: { api: pubnub } };

export let middleware = applyMiddleware(ReduxThunk.withExtraArgument(thunkArgument));

export let store = createStore( rootReducer, middleware, );

its giving me :

Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.

useState vs useReducer

Hiya,

I ran into an issue with the example provided in the readme. useState seems to always call the useEffect hook when setting the array of messages, therefore resubscribing on every render that the messages change.

To fix this we used useReducer to remove the state from the component and it fixed the issue. Should this be used going forward?

Hello world example

I tired to use the example from the readme but get the following Error.
Any help to a better documentation or example is appreciated. Any hints about what the error means are welcome too.

Uncaught TypeError: Cannot read property 'channel1' of undefined
    at init (getMessage.js:17)
    at PubNubReact.getMessage (getMessage.js:65)
    at Foobar.componentWillMount (index.js:87)
    at callComponentWillMount (react-dom.development.js:6337)
    at mountClassInstance (react-dom.development.js:6393)
    at updateClassComponent (react-dom.development.js:7849)
    at beginWork (react-dom.development.js:8233)
    at performUnitOfWork (react-dom.development.js:10215)
    at workLoop (react-dom.development.js:10279)
    at HTMLUnknownElement.callCallback (react-dom.development.js:540)
class Foobar extends Component {
  constructor(props) {
    super(props);
    this.pubnub = new PubNubReact({
      publishKey: '<MY_PUBLISH_KEY>',
      subscribeKey: '<MY_SUBSCRIBE_KEY>'
    })
    this.pubnub.init(this);
    this.state = {}
  }

  componentWillMount() {
    this.pubnub.subscribe({ channels: ['channel1'], withPresence: true });

    this.pubnub.getMessage('channel1', message => {
      this.setState({message})
    })

    this.pubnub.getStatus((st) => {
      this.pubnub.publish({ message: 'world', channel: 'channel1' });
    })
  }

  componentWillUnmount() {
    this.pubnub.unsubscribe({ channels: ['channel1'] })
  }

  render() {
    return <div> Hello {this.state.message}</div>
  }
}

ReactDOM.render(<Foobar/>, document.getElementById('app'))

Plans to reduce the bundle size?

Hey do you have any plans to reduce the bundle size?

Right now the packages measures 240 kb total which is slowing down my website.

Typescript typings

Any plans on implementing TS types for pubnub-react? It's kinda pain for now to work with this lib using TS.

Presence channel not unsubscribing after refresh

Hi,
After refreshing a react app, the presence channel subscription/ unsubscription is not working. No API calls are executed.

   "pubnub": "^5.0.1",
   "pubnub-react": "^2.1.1",

How do I resolve this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.