Skip to main content Accessibility Feedback

Reef

A lightweight library for creating reactive, state-based UI.

Reef is a simpler alternative to React, Vue, and other large frameworks.

Get started with Reef →

🚀 A new session of the Vanilla JS Academy starts on October 4. Learn to solve problems and think in JavaScript! Click here to join.

Features

  • Weighs just 3kb minified and gzipped, with zero dependencies.
  • Simple templating with JavaScript strings or template literals.
  • Load it with a <script> element or ES module import—no command line or transpiling required (though you can if you want).
  • Uses DOM diffing to update only the things that have changed.
  • Has Redux/Vuex-like data stores, with setters and getters baked right in.
  • Automatically sanitizes HTML before rendering to help protect you from cross-site scripting (XSS) attacks.
  • Work with native JavaScript methods and browser APIs instead of custom methods and pseudo-languages.
  • Compatible with all modern browsers.

Ditch that bloated framework, and make web development fun and simple again!

Why use Reef?

Reef is an anti-framework.

It does a lot less than the big guys like React and Vue. It doesn’t have a Virtual DOM. It doesn’t require you to learn a custom templating syntax. It doesn’t provide a bunch of custom methods.

Reef does just one thing: render UI.

Couldn’t you just use some template strings and innerHTML? Sure. But Reef only updates things that have changed instead of clobbering the DOM and removing focus from your form fields. It also automatically renders a new UI when your data updates, and helps protect you from XSS attacks.

If you’re craving a simpler, back-to-basics web development experience, Reef is for you.

(And if not, that’s cool too! Carry on.)

Get started with Reef →

Hi, I'm Chris Ferdinandi. 👋

Chris Ferdinandi

I believe there’s a simpler, more resilient way to make things for the web.

I create vanilla JS pocket guides and video courses, run a project-based training program, and host the vanilla JS podcast. My developer tips newsletter is read by over 12,400 developers each weekday.

If you have a question about something or need JavaScript help, get in touch.

Get Daily Developer Tips

I send out a short email each weekday with code snippets, tools, techniques, and interesting stuff from around the web. Join 12,400+ daily subscribers.