Skip to content

Instantly share code, notes, and snippets.

@pjcodesjs
Created May 6, 2021 05:18
Show Gist options
  • Save pjcodesjs/d9184b8b7edd28f48cfc7ef97a13f1a8 to your computer and use it in GitHub Desktop.
Save pjcodesjs/d9184b8b7edd28f48cfc7ef97a13f1a8 to your computer and use it in GitHub Desktop.
Feed table
import React, { useState, useEffect } from 'react';
import io from 'socket.io-client';
const FeedSection = () => {
const socket = io("ws://localhost:9000");
socket.on('latest_quakes', data => {
if (data) {
console.log(data);
}
});
return (
<section id='section-feed'>
<h1>Feed</h1>
</section>
);
}
export default FeedSection;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment