Coder Social home page Coder Social logo

Comments (6)

tipiirai avatar tipiirai commented on August 19, 2024 3

This is now implemented in a fully standards-based manner without any self-invented attribute names. For example, a custom element like <my-element> is now rendered as:

<div is="my-element"></div>

The is- attribute is a standard, global attribute and when this is found on a document Nue works as follows:

  1. If there is a custom HTML element defined with that name, the node is renreded as defined by the component
  2. Otherwise the node is mounted with a reactive Nue component, if one is defined

This brings substantial clarity for the whole division between web components and Nue/React/Svelte ecosystem. The standard web components are good for defining simple interactions and the reactive libraries are good for more complex interactivity.

All auto-mounting and hot-reloading features are now implemented to support this new syntax.

This is obviously a backwards- incompatible change, but the major version number won't change until we switch production with 1.0 version. Before that, in beta stage, we are only increasing the second version number. Mark would say "move fast, break things".

from nue.

ShiMeiWo avatar ShiMeiWo commented on August 19, 2024 1

If I had to come up with attributes names other than "engine", they would be:

  • def
  • from
  • beborn
  • madeof
  • generator

...What awkward names! I think "engine" is more better.

from nue.

tipiirai avatar tipiirai commented on August 19, 2024 1

This didn't made it to the release yet. This is a low-priority issue, because there is no apparent problem that this solves. Or is there?

from nue.

ShiMeiWo avatar ShiMeiWo commented on August 19, 2024

BTW, I want to know that if the implementation is done, will the rendered DOMs change from

<div island="my-component" :bind="item" />

to

<my-component :bind="item" />

like other "frontend framworks"?

And if so, the selector in CSS should be my-component {...} instead of [island="my-component"] {...} ?

from nue.

ShiMeiWo avatar ShiMeiWo commented on August 19, 2024

@tipiirai Do you plan to adopt this syntax in the upcoming NueKit release?

from nue.

nobkd avatar nobkd commented on August 19, 2024

Closing this, as the main concern has been resolved and released. Feel free to comment here or open a new issue if there is something left open.

from nue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.