import Chat from "./Chat/ChatMUIContainer" import {common, Firegun, Chat as ChatFG} from "@yokowasis/firegun" import { useEffect, useState } from "react"; // import {useRef} from "react" function App() { const [initChat, setInitChat] = useState<{fg:Firegun, chat:ChatFG}[]>([]) useEffect(()=>{ const fg = new Firegun(["https://gundb.myriad.systems/gun","https://gun-relay.bimasoft.web.id:16902/gun"]); const chat = new ChatFG(fg) const arr = [{ fg : fg, chat : chat, }] setInitChat(arr); },[]) return (
{ initChat.map((val,index)=>) } {/* */}
); } // function Test() { // const a = useRef([]); // const list = [0,1,2,3,4,5] // const click = () => { // let i = 3; // a.current[i].value = Math.random().toString() // } // return ( // <> // { // list.map((val,index)=>{ // return ( // { // if (el) { // a.current.push(el); // return (a.current[a.current.length]) // } else { // return null // } // }} /> // ) // }) // } // // // ) // } export default App;