How to define keys in React JSX when use Map function

I have Arrays of objects and needs to loop through it and display it in the DOM. I able to do it with map function. But i getting the error due to lack of providing unique keys for it. Remember, it is not using the component to loop. I just want JSX to loop through… Read More How to define keys in React JSX when use Map function

JavaScript querySelector – Select elements when the tag ends in a specified string

I am getting started with Web Components and want to get all elements where the tag name ends in "-component", in order to register them as custom tags. For best performance, I want to use querySelectorAll and not iterate over all elements. However, as you can see in the following example [tag$="-component"] does not find… Read More JavaScript querySelector – Select elements when the tag ends in a specified string

Element type is invalid: expected a string (for built-in components) or a class/function. while trying to render a component

` Unhandled Runtime Error Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it’s defined in, or you might have mixed up default and named imports. Check the render method of DashboardCards. ` Im… Read More Element type is invalid: expected a string (for built-in components) or a class/function. while trying to render a component