{"post":{"title":"How is Sapper different from Next.js?","date":"2020-02-16","author":"Jane Dev","preview":"Next.js is a React framework from Zeit, and is the inspiration for Sapper. There are a few notable differences, however.","slug":"how-is-sapper-different-from-next","html":"<h1 id=\"how-is-sapper-different-from-nextjs\">How is Sapper different from Next.js?</h1>\n<p><a href='https://github.com/zeit/next.js'>Next.js</a> is a React framework from <a href='https://zeit.co'>Zeit</a>, and is the inspiration for Sapper. There are a few notable differences, however:</p>\n<ul>\n<li>It&#39;s powered by <a href='https://svelte.dev'>Svelte</a> instead of React, so it&#39;s faster and your apps are smaller</li>\n<li>Instead of route masking, we encode route parameters in filenames. For example, the page you&#39;re looking at right now is <code>src/routes/blog/[slug].html</code></li>\n<li>As well as pages (Svelte components, which render on server or client), you can create <em>server routes</em> in your <code>routes</code> directory. These are just <code>.js</code> files that export functions corresponding to HTTP methods, and receive Express <code>request</code> and <code>response</code> objects as arguments. This makes it very easy to, for example, add a JSON API such as the one <a href='blog/how-is-sapper-different-from-next.json'>powering this very page</a></li>\n<li>Links are just <code>&amp;lt;a&amp;gt;</code> elements, rather than framework-specific <code>&amp;lt;Link&amp;gt;</code> components. That means, for example, that <a href='blog/how-can-i-get-involved'>this link right here</a>, despite being inside a blob of HTML, works with the router as you&#39;d expect.</li>\n</ul>\n","min_read":2},"prev":{"title":"How can I get involved?","date":"2020-02-15","author":"Jane Dev","preview":"We're so glad you asked!","slug":"how-can-i-get-involved"},"next":{"title":"Why the name?","date":"2020-02-16","author":"Jane Dev","preview":"In war, the soldiers who build bridges, repair roads, clear minefields and conduct demolitions — all under combat conditions — are known as sappers.","slug":"why-the-name","min_read":1}}