Unknown custom element: <component> – did you register the component correctly

This error occurs when creating dynamic components using JSX:

Unknown custom element: <component> - did you register the component correctly

The reason is that we take it for granted that in template syntax, dynamic components are created like this:

<component :is='dev-chart'></component>

The JSX syntax should be:

<component is={'dev-chart'}></component>

Then the above error appears, hhhhh.

Therefore, the correct way to write it is to use createElement instead of component is, which is the price of going deep into the bottom layer.

Source: https://blog.csdn.net/kw269937519/article/details/114080530


Read More: