React Problem function

Hui guys , somebody know because . when I use every function , react return this error ?

this is code

import "bootstrap/dist/css/bootstrap.min.css";
import { DropdownButton, Dropdown } from "react-bootstrap";
import React, { useEffect, useState } from "react";
import { ConnectButton, Icon } from "web3uikit";
import "../App.css";


export default function SideBar() {
  const [chainId, setChainId] = useState("0x1");
  useEffect(() => {
    console.log("new chain selection => " + chainId);
  }, [chainId]);
  return (
    <div className="SideBar">
      <div className="connectButton">       
        <DropdownButton  title="ChainId" onSelect={(key)=>{setChainId(key)}} >
          <Dropdown.Item eventKey="0xa86a">
            <Icon
              fill="#000000"
              size={20}
              svg="avax"
            />
          </Dropdown.Item>
          <Dropdown.Item eventKey="0x89">
            <Icon
              fill="#000000"
              size={20}
              svg="polign"
            />
          </Dropdown.Item>
          <Dropdown.Item eventKey="0x1">
            <Icon
              fill="#000000"
              size={20}
              svg="eth"
            />
          </Dropdown.Item>
          <Dropdown.Item eventKey="0x1">
            <Icon
              fill="#000000"
              size={20}
              svg="linux"
            />
          </Dropdown.Item>
        </DropdownButton>
        <ConnectButton />
      </div>
    </div>
  );
}

This is encountered after installing web3uikit: As mentioned here

You can installl console-browserify with yarn add console-browserify and import console from console-browserify before using console.log

1 Like

but i have already console-broserify in node_module.

You should import console from console-browserify in the code shared above then

1 Like

Perfect, code now function , but because now i have this problem ? in past month i have write a code in react and i havenโ€™t this problem , can be the problem that now i use Ubuntu ?

What I know so far as most people encounter the problem after installing web3uikit A discussion here

1 Like

ah thatโ€™s why on web i dont find soluction โ€ฆ good good , thank for help me !

1 Like