echoes/frontend/app/routes.tsx

15 lines
339 B
TypeScript
Raw Normal View History

import { useState } from "react";
2024-11-27 19:52:49 +08:00
import ReactDOMServer from "react-dom/server";
import { useLocation } from "react-router-dom";
const MyComponent = () => {
2024-11-27 19:52:49 +08:00
return <div>Hello, World!</div>;
};
export default function Routes() {
2024-11-27 19:52:49 +08:00
const htmlString = ReactDOMServer.renderToString(<MyComponent />);
2024-11-27 19:52:49 +08:00
return <div></div>;
}