You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Awesome library! I'm running into an error. All I've done is
install bs-socket
Copy Messages.re
Copy BsSocket.Client.make:
MyClient.re
module Client = BsSocket.Client.Make(Messages);
let socket = Client.createWithUrl("http://localhost:3000");
MyClient.bs.js
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
import * as Curry from "bs-platform/lib/es6/curry.js";
import * as React from "react";
import * as Belt_Array from "bs-platform/lib/es6/belt_Array.js";
import * as Client$BsSocket from "bs-socket/src/Client.bs.js";
import * as Messages$Codenames from "./Messages.bs.js";
var Client = Client$BsSocket.Make(Messages$Codenames);
// ...
function Game(Props) {
var id = Props.id;
React.useEffect((function () {
var socket = io(); <---- BREAKS HERE
console.log(socket);
console.log(id);
return ;
}), ([]));
}
Any help would be appreciated, thank you!
Am I supposed to be importing io somewhere?
The text was updated successfully, but these errors were encountered:
Hey everyone,
Awesome library! I'm running into an error. All I've done is
bs-socket
MyClient.re
MyClient.bs.js
Any help would be appreciated, thank you!
Am I supposed to be importing
io
somewhere?The text was updated successfully, but these errors were encountered: