3 ms·
I still like react-static. React + static. https://github.com/react-static/react-static https://github.com/react-static/react-static
by ldiracdelta 5y ago
I still like react-static. React + static.
https://github.com/react-static/react-static https://github.com/react-static/react-static
- brundolf 5y agoFun fact- if you're going 100% static then you don't need React, you can just use JS template literals. So instead of this: export const MyComponent = ({ first, last }) => <h1>Hello, {first} {last}!</h1> you'd just do this: export const myFragment = ({ first, last }) => `<h1>Hello, ${first} ${last}!</h1>` No dependencies (or build steps!) required
- jahewson 5y agoThis stops being fun as soon as you have a user named ‘<script>’
- brundolf 5y agoAny user-entered string data should be sanitized before it enters the DB anyway
- mustardo 5y agoDon't modify input, sanitise output instead. The user entered <script> you should save that verbatim, but there are many output formats, HTML, SQL, PS (Post Script), XLS etc etc where you need to escape user provided values