Torpor

Torpor is a full-stack JavaScript framework that is designed for simplicity and completeness.

🚧 WARNING: WORK IN PROGRESS 🚧

Simplicity

Define your UI with mostly-standard JavaScript, HTML and CSS

Make your UI state reactive with a single $watch function

Easily compose and refactor code and components as your project grows

Completeness

Torpor aims to include most of the things that you need to build high-quality interfaces without having to reach for third party libraries, including:

An accessible, unstyled component library

A site and app framework

More to come...

A counter

Below is an example Counter component, which maintains a count property in a reactive $state object, and displays the value of the count with a button to increment it:

Code

export default function Counter() {
	let $state = $watch({
		count: 0
	})

	@render {
		<div>
			<p>
				The count is {$state.count}.
			</p>
			<button onclick={() => $state.count++}>
				Increment
			</button>
			<button onclick={() => $state.count = 0}>
				Reset
			</button>
		</div>
	}
}

Component

The count is 0.

Edit this component in the playground