merkle-open / gondel

🚡 Gondel is a tiny library to bootstrap frontend components
https://gondel.js.org
MIT License
36 stars 10 forks source link

feature/generic-core-update #7

Closed janbiasi closed 3 years ago

janbiasi commented 6 years ago

Important changes summarized:

Other changes / notes

What are the benefits from this change?

More secure way to attach the component to DOM nodes (Symbols) inspired by bigger frameworks such as RXJS, Angular amm. The component annotation is now only used for the registration of the component, the mapping definition of the component is now located inside the class as static value. So in each core method where you had to pass a string with the name to it, you now simply pass the reference to the component and you'll have automatically the right type and the mapping name - which leads to the biggest benefit: all methods where components are passed (inside the core) now use this type as return type (before: GondelComponent). Other DOM utility methods now support (optional) generic arguments to automatically cast components (before: explicit casting with the as operator).

janwidmer commented 3 years ago

deleted due to inactivity