did anyone use useField for client side custom component . if yes then i need useField to be an array i am new to nextjs and payload please help . i am switching from vuejs so i am too young to handle states in react 😦
// Initialize faqs state based on the value from useField
const [faqs, setFaqs] = useState<Array<{ question: string, answer: string, id: string }>>(
Array.isArray(value) ? value : []
);```
here how my custom Faqs will look like
```{
name:'customFaqs',
type: 'array',
label: 'Custom FAQs',
defaultValue: [{ question: '', answer: '' }],
fields: [
{
name: 'question',
type: 'text',
label: 'Question',
},
{
name: 'answer',
type: 'textarea',
label: 'Answer',
},
],
admin: {
// Specify your custom component here
components: {
Field: FAQTabs,
},
},
},```
i think useField need to return an array but its returning 0 in value 😦
is this right thing i am doing