The concept of VirtualDOM introduced by React quickly affected other frameworks. In recent years, a method of combining small packages has become mainstream in relation to Web components.
This time Marko is one such framework. Especially high speed operation is a point.
How to use Marko
An example of Marko. We combine class, style, and HTML.
- class {
- onCreate() {
- this.state = { count:0 };
- }
- increment() {
- this.state.count++;
- }
- }
- style {
- .count {
- color:#09c;
- font-size:3em;
- }
- .example-button {
- font-size:1em;
- padding:0.5em;
- }
- }
- <div .count>
- ${state.count}
- </div>
- <button .example-button on-click('increment')>
- Click me!
- </button>
This is a web application that counts up as you click.
When clicking, the number will be incremented.
You can choose either HTML or a description similar to Haml.
Marko emphasizes performance, the performance is the highest compared with React / Angular / Vue / Inferno. It is an advantage to be able to use either server side or client side.
Because eBay is developing, development continuity seems to be no problem. Although React is convenient, it may be solved with Marko because speed is concerned.
Marko is open source software (MIT License) made by node / JavaScripts.
No comments:
Post a Comment