SOLVED: Using Hooks to insert current user ID to form submisson

Did you try invoking the referenceInsert function inside of your if statement?

if (item.userReference === 0) {
referenceInsert();
}