Socket
Socket
Sign inDemoInstall

bruh

Package Overview
Dependencies
46
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bruh

The thinnest possible layer between development and production for the modern web.


Version published
Weekly downloads
24
increased by166.67%
Maintainers
1
Install size
18.3 MB
Created
Weekly downloads
 

Readme

Source

Bruh

The thinnest possible layer between development and production for the modern web.

MIT License NPM Version Distributed download size for the entire library Github Discussions


What's This?

A js library for the web that places your control on a pedestal. It packs flexible SSR (Server-Side HTML Rendering), an awesome DOM interface, and elegant functional reactivity in a tiny code size.

Along with modern build tooling integration (vite), you're one step away from:

  • JSX and MDX (markdown with JSX instead of HTML) for both HTML rendering and DOM element creation
  • Instant HMR (Hot Module Reloading) for both server rendered HTML and client CSS/JS/TS
  • Everything else vite provides - CSS modules, PostCSS, production builds, nearly 0 config, &c.

It looks like this, which is pretty epic: Open in CodePen


const Counter = () => {
  // A reactive value
  const count = r(0)
  const increment = () => count.value++

  // Declarative UI without vdom! (and build tools are completely optional)
  const counter =
    <button class="counter" onclick={ increment }>
      Click to increment: { count }
    </button>

  return counter
}

// Yes, all of these are vanilla DOM nodes!
document.body.append(
  <main>
    <h1>Bruh</h1>
    <Counter />
  </main>
)

How do I Get It?

npm init bruh and pick the "vite" template

Think that's too hard? 👉 Open in CodeSandbox


Where is the documentation?

Right here - but it's not really complete. The best way to use this project is to just read the code, it's pretty short. If you have any questions, even without reading the code first, feel free to ask all of them in the discussions.

Keywords

FAQs

Last updated on 12 Sep 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc