This is what I'm trying to do inside the export default function
const Create = () => {
handleClose();
let temp = '';
if (thing1) {
temp= 'text';
}
if (thing2) {
temp += 'text';
}
if (thing3) {
temp += 'text';
}
if (thing4) {
temp += 'text';
}
if (thing5) {
temp += 'text';
}
setsel(temp);
Obviously I have something else for temp, having it loop through things to get a value but that's the basic idea - It comes back as undefined when I console.log "thing" to test it out.