3 ms·
The truth I learned building my own SSR JavaScript framework is that it's not that complicated, it's just made complicated. 1. Get some data from a database/so
by rglover 5y ago
The truth I learned building my own SSR JavaScript framework is that it's not that complicated, it's just made complicated.
1. Get some data from a database/source.
2. Pass that data to a template/component.
3. Convert that template/component to HTML (using the given framework's version of renderToHTML()).
4. Return the HTML to your HTTP request.
For example, here's the SSR for my framework: https://github.com/cheatcode/joystick/blob/development/node/src/ssr/index.js https://github.com/cheatcode/joystick/blob/development/node/.... It blew my mind when I wrote it because I was under the impression it would be more difficult.