https://github.com/rafael-vasconcellos/coffee-ssr
playing with ssr on vite
https://github.com/rafael-vasconcellos/coffee-ssr
front-end landing-page react react-router reactjs ssr study ui-framework-study vite
Last synced: 3 months ago
JSON representation
playing with ssr on vite
- Host: GitHub
- URL: https://github.com/rafael-vasconcellos/coffee-ssr
- Owner: rafael-vasconcellos
- Created: 2024-06-09T09:45:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-19T10:36:07.000Z (7 months ago)
- Last Synced: 2025-03-19T11:32:48.693Z (7 months ago)
- Topics: front-end, landing-page, react, react-router, reactjs, ssr, study, ui-framework-study, vite
- Language: CSS
- Homepage:
- Size: 1.14 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sobre
estudo do uso de server side rendering (SSR) em aplicações feitas com o vite
## JSX se torna JS. como?
### Exemplo básico
```js
// transpilador
const babel = require("@babel/core");
const presetReact = require("@babel/preset-react");const jsxCode = `
const App = () => (
Hello
SolidJS
)
`;const output = babel.transformSync(jsxCode, {
presets: [presetReact],
});console.log(output.code);
```### Output
```js
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
//import { jsxs } from "solid-js/h";const App = () => (
jsxs("div", {
children: [
jsx("h1", { children: "Hello" }),
jsx("p", { children: "SolidJS" }),
],
});
)
```