nestjs-tsx-views
Version:
Server-side JSX/TSX rendering for your NestJS application 🚀
15 lines • 580 B
JavaScript
import React, { useContext } from 'react';
import { MainLayout } from './layouts/main.js';
import { MyContext } from './my-context.js';
const MyView = ({ name, ...props }) => {
const myContext = useContext(MyContext);
return (React.createElement(MainLayout, { ...props },
React.createElement("div", null,
"Hello ",
name),
React.createElement("div", null,
"Hello context: ", myContext === null || myContext === void 0 ? void 0 :
myContext.name)));
};
export default MyView;
//# sourceMappingURL=my-view.js.map