{"id":13515503,"url":"https://github.com/jaredpalmer/razzle-unrouted","last_synced_at":"2025-04-19T13:42:31.288Z","repository":{"id":146972051,"uuid":"120203559","full_name":"jaredpalmer/razzle-unrouted","owner":"jaredpalmer","description":"Blazingly fast server-rendered MVC Webapps with Preact and Webpack","archived":false,"fork":false,"pushed_at":"2018-07-10T16:04:11.000Z","size":93,"stargazers_count":42,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T08:22:27.837Z","etag":null,"topics":["mvc","preact","react","server-rendering"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaredpalmer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-04T16:47:53.000Z","updated_at":"2021-09-01T01:15:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"272f7dbf-8ed4-4789-aadb-97fd9f960ffe","html_url":"https://github.com/jaredpalmer/razzle-unrouted","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.4285714285714286,"last_synced_commit":"55ea2c897c670f36a93ba4144fc716c94930391d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredpalmer%2Frazzle-unrouted","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredpalmer%2Frazzle-unrouted/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredpalmer%2Frazzle-unrouted/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredpalmer%2Frazzle-unrouted/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaredpalmer","download_url":"https://codeload.github.com/jaredpalmer/razzle-unrouted/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249705144,"owners_count":21313290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mvc","preact","react","server-rendering"],"created_at":"2024-08-01T05:01:12.103Z","updated_at":"2025-04-19T13:42:31.257Z","avatar_url":"https://github.com/jaredpalmer.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Razzle Unrouted\n\nSometimes, you don't want to build an SPA.\n\n## The Problem with Single Page Applications...\n\nThey take a while. For a single view you need to write an API endpoint and then write the data fetch on the client. In contrast, with a good ol' web app, like a 2007-style web app, you just get the data and pass it to your template. memba?\n\n## Speaking of templates...\n\nTemplates suck. Components kick ass. As it turns out, React is a great templating language. However, in prior projects like express-engine and express-react-views, they required completely separate client-side JavaScript. What does that mean? Well you'd get to use React for templating, but then would need to sprinkle client-side JavaScript wherever you still needed it. For example, modals and buttons and other stuff wouldn't work, because that code was never going to be run in the browser.\n\n## The Solution\n\nThis is an example of how to solve this problem. Using Razzle, this project shows how **you could use Preact as a templating language for Express, but then also reuse the same components on the client (without the need for client-side routing)**. It works by creating a webpack entry for each component in the views directory and using express middleware to inject props.\n\n## Differences from other (p)React apps\n\n* There is no client-side \"router.\" You just use vanilla `\u003ca\u003e` tags\n* You'll need to handle CSRF\n* You'll need cookies and sessions for authentication\n* Data is fetched in express controllers (for now)\n* You can ship your idea 2-3x faster than you would with an SPA.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredpalmer%2Frazzle-unrouted","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredpalmer%2Frazzle-unrouted","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredpalmer%2Frazzle-unrouted/lists"}