Home > AI > Frontend > ReactJS >

SSR TypeScript framework

After resolving the TypeScript version mismatch, it led to additional challenges.

Feeling overwhelmed, I commented out all the content within the return statement in App.tsx, replacing it with the simplest <div>sample</div>.

Upon running npm run build and tsc --project tsconfig.json, localhost:8000 successfully displayed the source code, indicating the successful configuration of Server-Side Rendering on the server. I feel assured to proceed.

The next issue arose when CSS attributes couldn’t be used within <div> elements in .tsx files. To simplify, I removed all such attributes, intending to adjust styles later.

Further complications arose when TypeScript failed to recognize SCSS. In .ts files, necessitating the use of a webpack bundler.

My supervisor pointed out that starting from scratch would likely encounter endless issues and suggested exploring GitHub or using Google with keywords related to TypeScript SSR frameworks to find a complete yet simple project to begin with. I found this advice to be highly useful.

Leave a Reply