Skip to content

Repository files navigation

Code11 Engine

pushcodecov

The Code11 Engine is a declarative state management system and application builder.

Read the documentation for more information.

Usage

Get started using the cli:

npx @c11/engine.cli create my-app
cd my-app
npm start

Example

// App.tsxexportconstApp: view=({
name =observe.name,
greeting =observe.greeting,
updateName =update.name,})=>(<div><h1>{greeting}</h1><inputdefaultValue={name}onChange={(e)=>updateName.set(e.currentTarget.value)}/></div>);constgreeter: producer=({
name =observe.name,
updateGreeting =update.greeting,})=>{constgreeting=name ? "Enter your name:" : `Hello ${name}!`;updateGreeting.set(greeting);};App.producers([greeter]);
// index.tsximport{engine}from"@c11/engine.runtime";import{render}from"@c11/engine.react";import{App}from"./App";constapp=engine({state: {name: "Foo Bar",},use: [render(<App/>,"#app")],});app.start();

The rendering is done by views. Views observe and update anything on the state. The business logic sits in producers.

About

A declarative state management system

Topics

Resources

Contributing

Security policy

Stars

9 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages