I see Uniswap and a lot of other frontend UIs can check if an ERC20 token has approved the contract to use the address's funds, and dynamically change their buttons to "Swap" from "Approve" (since Approve does not need to be called again after a token has called the function once). What is the standard way to do this? I am using React right now. Thank you for any advice.
You will need to use a Web3 library such as Web3.js.
Regarding any smart contract, call the allowance method.
Specific to a farm, you can check with Zapper API by following this link: