Code from README doesn't work
kopyl opened this issue · 1 comments
kopyl commented
Code:
import React, { useRef } from 'react';
import SVG, { Props as SVGProps } from 'react-inlinesvg';
const Logo = React.forwardRef<SVGElement, SVGProps>((props, ref) => (
<SVG innerRef={ref} title="MyLogo" {...props} />
));
export function App() {
const logo = useRef<SVGElement>(null);
return (
<main>
<SVG src={`${process.env.PUBLIC_URL}/menu.svg`} width={24} height="auto" title="Menu" />
<Logo ref={logo} src={`${process.env.PUBLIC_URL}/logo.svg`} />
</main>
);
}
https://i.imgur.com/eXhVxfS.png
Error: Component definition is missing display name
https://i.imgur.com/eXhVxfS.png
gilbarbara commented