Popular questions

Why should i use Akili?

  • it is very easy to learn, use and test
  • it does not require any additional dependencies
  • it can be used without javascript compilation in all modern browsers
  • it is a pure, lightweight, expandable and powerful framework
  • it is javascript way, without magic

What is the main idea?

  • component is a smart and powerful extension of html element to control it
  • you can synchronize the element with its content by changing the necessary component variable
  • the scope of a component is separated from the scope of its template
  • the component has inheritance and encapsulation capability
  • the —Āomponents can interact with each other
  • there are a routing and ajax requests to fully implement the single page application

Is this approach too slow?

No, it is comparable with other similar frameworks.

How can i replace/extend some system component with my own?

The easiest and clearest way is:

import Akili from 'akili';
import Input from 'akili/src/components/input';

class MyInput extends Input {
  static define() {
    Akili.component('input', MyInput);
  }

  compiled() {
    super.compiled.apply(this, arguments);
    this.myOwnMethod();
  }

  myOwnMethod() {
    // do something
  }
}

MyInput.define();

document.addEventListener('DOMContentLoaded', () => {
  Akili.init().catch((err) => console.error(err));
});

How can I access one component in another?

Use communication methods between the components.

How can I attach my component to a specific element, but not by tag?

You can use aliases.

How can I get the routing data in my component?

Every component extends this information from the nearest route component, and you can get it in scope.__transition property.

How can i remove the component or alias from Akili?

Use Akili.unregisterComponent(name) and Akili.unregisterAlias(selector).

Does the framework support server rendering?

Yes and no. Akili is not isomorphic, but we made akili-connect library for nodejs which can do it.

How can I speed up my application?

Use Akili.options.nestedWatching = false and immutable approach.

Is this site written using Akili?

Sure =)

How can i help the project?

You can:

  • create some great application using the framework
  • tell your friends about it
  • offer new interesting ideas
  • give feedback about bugs
  • support financially