DEV Community

Sasha Blagojevic
Sasha Blagojevic

Posted on

What is Dev.to's frontend stack?

Top comments (16)

Collapse
 
ben profile image
Ben Halpern •

Part Vanilla JS, part Preact.

GitHub logo preactjs / preact

⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.

Preact

Fast 3kB alternative to React with the same modern API.

All the power of Virtual DOM components, without the overhead:

  • Familiar React API & patterns: ES6 Class, hooks, and Functional Components
  • Extensive React compatibility via a simple preact/compat alias
  • Everything you need: JSX, VDOM, DevTools, HMR, SSR.
  • Highly optimized diff algorithm and seamless hydration from Server Side Rendering
  • Supports all modern browsers and IE11
  • Transparent asynchronous rendering with a pluggable scheduler

💁 More information at the Preact Website ➞

npm Preact Slack Community OpenCollective Backers OpenCollective Sponsors

coveralls gzip size brotli size

You can find some awesome libraries in the awesome-preact list 😎


Getting Started

💁 Note: You don't need ES2015 to use Preact... but give it a try!

Tutorial: Building UI with Preact

With Preact, you create user interfaces by assembling trees of components and elements. Components are functions or classes that return a description of what their tree should output. These descriptions are typically written in JSX (shown underneath)…

Collapse
 
himanshuc3 profile image
Himanshu •

Why did you guys use Preact instead of React. The main motivation?

Collapse
 
buinauskas profile image
Evaldas Buinauskas • • Edited

If I remember right, Ben once said that performance is the most important part of UX, and Preact delivers that. Also he doesn't like Facebook. Feel free to correct me if I made a mistake here. 🙂

Thread Thread
 
ben profile image
Ben Halpern • • Edited

Yes, it's an app where 90% of the traffic is people just coming here to read a server-rendered article. While we have interactions, we mostly just want to get people started on what they came here to do as quickly as possible.

But also I really believe that Preact's creator @_developit cares about the same things I do, so as things evolve in the future I just feel like things are in good hands.

Thread Thread
 
oathkeeper profile image
Divyesh Parmar •

Does that mean it is server side rendering? I'm just practising node.js/express.js with EJS templates so just curious.

Sorry if this was amateur question

Thread Thread
 
ben profile image
Ben Halpern •

No such thing as too amateur, whatever that even means. Yeah, server-side rendering using "old-school" Rails html.erb files. I believe those is are EJS is inspired by, so pretty much the same thing I think.

Thread Thread
 
oathkeeper profile image
Divyesh Parmar •

Ooh Cool, with EJS I seem to work on the standard tech right now

Collapse
 
blackcat_dev profile image
Sasha Blagojevic •

I'm kinda saddened by the fact that more and more people are leaving the old school approach, Turbolinks is a nice alternative for a smooth UX in my opinion, and Stimulus looks promising as well. I'm not the biggest fan of "javascript rich" front-ends :(

Collapse
 
ambroseus profile image
Eugene Samonenko •

I'm also was not a fan of FE frameworks before I try vue.js.. :)

Collapse
 
nektro profile image
Meghan (she/her) •

what do you mean the old school approach?

Thread Thread
 
ambroseus profile image
Eugene Samonenko •

old school approach is jQuery :)

Collapse
 
jcmellado profile image
Juan Mellado •

Ben wrote about that some months ago:
dev.to/ben/why-we-went-with-preact...

Collapse
 
blackcat_dev profile image
Sasha Blagojevic •

Thanks for the link, I haven't been that active here previously so I probably missed it

Collapse
 
eimji profile image
Eimji •

does dev.to have a mobile app ?

Collapse
 
blackcat_dev profile image
Sasha Blagojevic •

I don’t think so, their website is what is considered a Progressive Web App, I think they wrote an article about it some time ago.

Collapse
 
blackcat_dev profile image
Sasha Blagojevic •

I'll take a guess since Dev.to's backend is Ruby if I'm correct, then they probably use Turbolinks to some extent. But what else do they use?