Closed Rohan-Hazari closed 1 year ago
Facing the same error. However adding something like below works. but this won't pass down any props
widgets: [
{
widgetName: 'dogPicture',
widgetFunc: (props) => DogPicture,
},
],
Thanks @void-ness that worked
@Rohan-Hazari I noticed the above error only while instantiating a react app using vite. I tried instantiating a react app using "create-react-app" template and the above error wasn't seen.
Therefore it has something to do with one of the dependencies by vite.
For anyone who comes across this issue in the future. You may use something like this to pass props in Vite.
widgets: [
{
widgetName: 'dogPicture',
widgetFunc: (props) => DogPicture(props),
},
],
I followed the recent docs and tried to to the DogPicture widget but I kept getting this error Unexpected Token '<' at the widgetFunc line
I dont understand What I did wrong
this is my config file (also showing my directory just in case )