Hello there,
I have searched online but couldn’t find anything for the error that I am facing. I have the below jsx
file which returns a <Select />
component.
This is the jsx file that is complained about:
import {filter, includes, map, toString} from "lodash";
import ForgeReconciler, {Select, useProductContext} from "@forge/react";
import React, {useEffect, useState} from "react";
import {JWT_TOKEN, REST_SEARCH_ASSETS} from "../../index";
export const Edit = () => {
const [data, setData] = useState([]);
const context = useProductContext();
return (
<Select label="Select Assets"
name="valueSelect"
isMulti={true}
options={[
{label: 'Apple', value: 'a'},
{label: 'Banana', value: 'b'},
]}
/>
);
}
ForgeReconciler.render(
<React.StrictMode>
<Edit/>
</React.StrictMode>
);
It throws the error below:
I have another problem with React
. I cannot use React hooks. I see the errors in the console:
Kind regards