57 |
React socket.io
58 |
72 | {list.map((message, index) => (
73 |
{message}
74 | ))}
75 |
76 | );
77 | }
78 |
79 | export { Socket };
80 |
--------------------------------------------------------------------------------
/src/socket/provider/providerNativeFactory.ts:
--------------------------------------------------------------------------------
1 | import { useEffect, useRef, useState } from "react";
2 | import { useEvent } from "../../utils";
3 | import { Context, Hub } from "../types";
4 | import { createConnection, isConnectionConnecting } from "../utils";
5 | import { ProviderProps } from "./types";
6 |
7 | function providerNativeFactory