Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

export socket io connection in react

// service/socket.js
export const socket = socketio.connect(SOCKET_URL);
// elsewhere
import {socket} from "service/socket";
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #export #socket #io #connection #react
ADD COMMENT
Topic
Name
9+3 =