Forge UI Kit Webpack entrypoint size limit warning is blocking the view

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

That’s not an error. It’s just a warning. I get it all the time and it’s safe to ignore. For the useState error, I would start with checking that you have the correct dependencies installed.

Hi @rcsr,

It might not be an error but it is displayed in my modal so it’s a problem for me.

and for the useState error, I have also shared the import lines in my thread. What is the wrong one and what should be the correct one? I checked the documentations over and over again. According to those, I must be able to use React hooks:

furkan