All Projects → callmecavs → hsx

callmecavs / hsx

Licence: other
Static HTML sites with JSX and webpack (no React).

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to hsx

Preact
⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.
Stars: ✭ 30,527 (+203413.33%)
Mutual labels:  components, dom, jsx
Kit
Tools for developing, documenting, and testing React component libraries
Stars: ✭ 1,201 (+7906.67%)
Mutual labels:  components, jsx
Scalajs Bootstrap
Scala.js bootstrap components
Stars: ✭ 55 (+266.67%)
Mutual labels:  components, dom
X0
Document & develop React components without breaking a sweat
Stars: ✭ 1,706 (+11273.33%)
Mutual labels:  components, jsx
astro
Build fast websites, faster. 🚀🧑‍🚀✨
Stars: ✭ 11,024 (+73393.33%)
Mutual labels:  components, static
Bloomer
A set of React components for Bulma CSS Framework
Stars: ✭ 683 (+4453.33%)
Mutual labels:  components, jsx
Redux React Starter
DEPRECATED use the new https://github.com/didierfranc/react-webpack-4
Stars: ✭ 137 (+813.33%)
Mutual labels:  components, jsx
Jsx Dom
Use JSX to create DOM elements.
Stars: ✭ 117 (+680%)
Mutual labels:  dom, jsx
React Scanner
Extract React components and props usage from code.
Stars: ✭ 176 (+1073.33%)
Mutual labels:  components, jsx
Val
VirtualDOM abstraction layer - give yourself better integration and full control over the DOM with any virtual DOM library that uses a Hyperscript-like API such as React and Preact.
Stars: ✭ 181 (+1106.67%)
Mutual labels:  components, dom
Crank
Write JSX-driven components with functions, promises and generators.
Stars: ✭ 2,487 (+16480%)
Mutual labels:  components, jsx
swayer
Schema based frontend framework 👀
Stars: ✭ 40 (+166.67%)
Mutual labels:  components, dom
Preact Markup
⚡️ Render HTML5 as VDOM, with Components as Custom Elements!
Stars: ✭ 167 (+1013.33%)
Mutual labels:  dom, jsx
string-dom
Create HTML strings using JSX (or functions).
Stars: ✭ 13 (-13.33%)
Mutual labels:  dom, jsx
Nativejsx
JSX to native DOM API transpilation. 💛 <div> ⟹ document.createElement('div')!
Stars: ✭ 145 (+866.67%)
Mutual labels:  dom, jsx
React Workshop
⚒ 🚧 This is a workshop for learning how to build React Applications
Stars: ✭ 114 (+660%)
Mutual labels:  components, jsx
callbag-jsx
callbags + JSX: fast and tiny interactive web apps
Stars: ✭ 69 (+360%)
Mutual labels:  dom, jsx
Hyperawesome
A curated list of awesome projects built with Hyperapp & more.
Stars: ✭ 446 (+2873.33%)
Mutual labels:  dom, jsx
Lucid
A UI component library from AppNexus.
Stars: ✭ 171 (+1040%)
Mutual labels:  components, jsx
Next.js
The React Framework
Stars: ✭ 78,384 (+522460%)
Mutual labels:  components, static

hsx

hsx Stability Index hsx on NPM Standard JavaScript Style

Static HTML sites with JSX, Sass, and webpack (no React).

About

  • Meant for building static websites (not apps)
  • Compiles JSX to HTML, without React (JSX becomes an HTML templating language)
  • Supports simple, presentational Components (similar to React's functional stateless components)

Why?

  • JSX is an incredibly powerful HTML templating language
  • "HTML in JS" feels awesome
  • webpack is insanely powerful
  • Building static sites with a module bundler (webpack) offers distinct advantages over gulp/grunt

What's in the Box

hsx is a CLI for scaffolding a new project (see the template). A brief description of what's inside follows:

Install

$ npm i hsx -g

Use

To create a new project:

# using node and npm
# install hsx globally
$ npm install hsx -g

# use the hsx command from the CLI to scaffold a project
# template files are copied to the CWD, unless a path is specified
$ hsx [path]
$ npm i
$ npm run dev

Then, in your browser: http://localhost:3000/

First Component

Note the cue to babel to transform JSX into sd function calls, instead of React.createElement.

import sd from 'string-dom'

/** @jsx sd */

// create a simple Div component
// children is the HTML wrapped by the element
const Div = ({ children, name }) => (
  <div class={ name }>
    { children }
  </div>
)

// render it to the DOM, with some inner content
document.body.innerHTML += (
  <Div name="site">
    <h1>hsx</h1>
    <p>This is inside the Div component!</p>
  </Div>
)

License

MIT. © 2017 Michael Cavalea

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].