Popularity
4.8
Growing
Activity
9.6
Growing
18
115
412

Description

CanJS is a MIT-licensed, client-side, JavaScript framework that makes building rich web applications easy. Use it because it’s:

Code Quality Rank: L3
Monthly Downloads: 0
Programming language: JavaScript
License: MIT License
Latest version: v6.0.0-pre.9

canjs alternatives and similar libraries

Based on the "MVC Frameworks and Libraries" category

Do you think we are missing an alternative of canjs or a related project?

Add another 'MVC Frameworks and Libraries' Library

README

CanJS

SauceLabs Test Status

Join our Slack Join our Discourse npm version Build Status Greenkeeper badge

CanJS is a collection of client-side JavaScript architectural libraries.

Web Components

CanJS’s StacheElement allows you to create Web Components with observable properties and live-bound templates.

class Counter extends StacheElement {
    static view = `
        Count: <span>{{ this.count }}</span>
        <button on:click="this.increment()">+1</button>
    `;

    static props = {
        count: 0
    };

    increment() {
        this.count++;
    }
}
customElements.define("my-counter", Counter);

Model layer

Components shouldn’t be concerned with how data is fetched, updated, or cached.

CanJS provides the right abstractions for your model code to be cleanly separated from your UI code. [Learn more…](./readme-feature-model-layer.md)

Promises in templates

CanJS’s stache templating language can directly read the state and values from Promises.

No need to write any extra code to determine whether a Promise is pending, resolved, or rejected. [Learn more…](./readme-feature-promises-in-templates.md)

{{# if(this.promise.isPending) }}
  Loading…
{{/ if }}
{{# if(this.promise.isRejected) }}
  Error: {{ this.promise.reason }}
{{/ if }}
{{# if(this.promise.isResolved) }}
  Result: {{ this.promise.value }}
{{/ if }}

Real-time list updating

After data is created, updated, or destroyed, CanJS automatically updates your lists for you.

Filtering and sorting are preserved, so you don’t have to manually update your lists or fetch the same data again. [Learn more…](./readme-feature-real-time-list-updating.md)

Getting Started

Ready to get started? See the Setting Up CanJS, API Docs and Guides pages.

Support / Contributing

Before you make an issue, please read our Contributing guide.

You can find the core team on Slack.

Release History

See Releases.

License

[MIT License](license.md).


*Note that all licence references and agreements mentioned in the canjs README section above are relevant to that project's source code only.