Relative Content

Tag Archive for reactjsreact-nativereact-hooks

Hook is not reliably updating data it randomly works

I have a hook to keep track of whether a button was clicked. These buttons can be selected with isSelected from the beginning so I have an initialTags variable to track the intial state of the tag. I have an addFactiiis variables that tells the server to add or update data and a removeFactiiiIds variable that tells the server to delete factiiis with that id. This entire thing does not work reliably. I’ve tried useState and other ways to implement this and nothing works reliably. I use the Here is the hook: