I have typescript code that I want to convert to Javascript:
interface Props {
children?: ReactElement | Array<ReactElement>;
}
const Trail: React.FC<Props> = ({ children, ...props }) => {
How do i convert this to something similar in javascript since theres no interfaces?
interfaceand the type annotation: React.FC<Props>. You can still destructure your props in the same way, but you lose all of the information about their types because that only exists in typescript.