-2👍
in your Routes mapping, update the code to :
{submenu.length > 0 ? (
<React.Fragment>
{submenu.map((items, index) => (
<Route exact key={index} path={items.path} element={items.element} />
))}
</React.Fragment>
) : (
<Route exact path={path} element={element} />
)}
please check if the activeDropdown
state variable is correctly set and matches the index you’re comparing it with in the condition {activeDropdown === index}
. Verify that index
and activeDropdown
have the correct values.
- [Vuejs]-How to add an uploaded file to a list of already uploaded files in Vue?
- [Vuejs]-Vue JS – Uncaught TypeError: __WEBPACK_IMPORTED_MODULE_1__App_vue
Source:stackexchange.com