I have an AppIcon
like this:
import { createIconSetFromIcoMoon } from "@expo/vector-icons";import icoMoonSelection from "../assets/fonts/selection.json";export const AppIcon = createIconSetFromIcoMoon(icoMoonSelection, "icomoon", "icomoon.ttf");
When I use this in other screens or components, with an import like below, I get the following Typescript error. The error goes away if I do const AppIcon = require("../components/AppIcon")
. What is the right way of importing the component?
import { AppIcon } from "../components/AppIcon";
'AppIcon' cannot be used as a JSX component.Its instance type 'Component<IconProps, {}, any>' is not a valid JSX element.ts(2786)