High-Order Component(HoC)Factory Method
import React from "react";
const Comment = props => {
return (
{props.name}
{props.message}
);
};
const createComponent = init => props =>
export default function App() {
const HogeComponent = createComponent({ name: "hoge" }); // hoge
const FugaComponent = createComponent({ name: "fuga" }); // fuga
return (
<>
>
);
}
1Single Page Application