Moralis.Units.FromWei useState issue

Hello,
When i pass the Moralis.Units.FromWei value into the useState, i get this error in the console.
Uncaught (in promise) TypeError: setBalanceCheck is not a function
Here is the my code;

const fetchNativeBalance = async () => {
        const options = {
          chain: chainId,
        };
        const balanceNative = await Web3Api.account.getNativeBalance(options);
        const userBalanceToWei = Moralis.Units.FromWei(balanceNative.balance);
        console.log(typeof userBalanceToWei);
        setBalanceCheck(userBalanceToWei); }

Thanks for any help!

Any help for this problem?

Is this function defined?

Yes, it is defined.
Like this:

const[balanceCheck, setBalanceCheck] = useState("");

From the code, I don’t see anything that could cause this error.

See if this thread has any possible solution stackoverflow

Looks fine, where have you defined the useState and fetchNativeBalance?

You can try to set a number there or a string to see how it works, instead of a variable.