const customHook = () => {
let [state, setState] = useState('пустой');
let arr = [1, 2, 3 ];
if(arr.length > 1) {
setState('полный', () => {
console.log(state)
});
}
if(arr.length < 1) {
setState('пустой')
}
return {arr} /* пустой */
}
export default customHook;
foreach($guildtest as $guild) {
echo $guild->name;
}