React Component is not working with Admin UI
Closed this issue · 5 comments
According to this documentation https://docs.vendure.io/guides/extending-the-admin-ui/defining-routes/
When I create A react component it return this error for all jsx elements
'h2' does not exist on type 'JSX.IntrinsicElements'
Please share steps to reproduce
I have done exactly as the documentation. On this page https://docs.vendure.io/guides/extending-the-admin-ui/defining-routes/#example-creating-a-greeter-route from step 1 up to step 3 to create a new route
and this the react component
import React from 'react';
export function Greeter() {
const greeting = 'Hello!';
return (
<div className="page-block">
<h2>{greeting}</h2>
</div>
);
}
One other thing that I want ot mention that defining new route is working perfectly when using angular components but when I try to use React Component it return errors like
`
'h2' does not exist on type 'JSX.IntrinsicElements'
// or
'div' does not exist on type 'JSX.IntrinsicElements'
`
One other thing that I want to mention is that, defining new route is working perfectly when using angular component, but when I try to use React Component, it return errors like
'h2' does not exist on type 'JSX.IntrinsicElements' // or 'div' does not exist on type 'JSX.IntrinsicElements'
OK. Did you try googling that error message? If so, what potential solutions did you find? Did you try implementing any of those solutions?