0.1.1139 • Published 1 year ago

feeel v0.1.1139

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

A simple frontend framework for HTML

Installation

npm i feeel -S

Usage

See examples folder

Why

I am playing with idea about how to make something similar to React, but what would really harness the power of TS, also, won't make you change the mindset from OOP to compoment based thinking.

Ideas:

  • props and states are not contained in the objects inside the Component, but are members of the Component class - however, they are defined with decorators @prop and @state (or @p and @s)

React problem

The problem of React is that it makes you shift your mindset from pure OO to component based thiking. As for me, I would like to have the simplicity of React html rendering, but to have also full access to OOP.

conventions

friend functions

Typescript lacks frend functionality.

So if you want class Foo to have a function that is a friend for class Bar, prepend it with __friendToBar__. For example:

class Foo{
    __friendToBar__myFunc(){}        
}
class Bar{
    foo:Foo;
    constructor() {
        // can use his function
        this.foo.__friendToBar__myFunc();
    }
}
class Selecta{
    foo:Foo;
    constructor() {
        // should NOT use his function, although TS syntax does not forbid us from doing it
        /*!!!*/this.foo.__friendToBar__myFunc();
    }    
}
0.1.1138

1 year ago

0.1.1139

1 year ago

0.1.1135

1 year ago

0.1.1136

1 year ago

0.1.1137

1 year ago

0.0.1134

3 years ago

0.0.1133

3 years ago

0.0.1132

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.1

3 years ago