Giter VIP home page Giter VIP logo

Comments (6)

sxzz avatar sxzz commented on May 13, 2024 2

The essence of designing Vapor is: that we need to maximize compatibility with the existing behavior of Vue core.

  • Currently, we don't need to consider macros like defineProps; they belong to the scope of SFC compiler and will ultimately be compiled into the props option.
  • We need to support options like props, emits, and others, as well as the setup function. However, there's no need to implement the Options API such as data, created, computed, etc.
  • Props should be stored in the ComponentInternalInstance for composable retrieval.
  • As you mentioned the https://github.com/sxzz/vue-simple-props project. Currently, we might need a formal RFC or experiment first in Vue Macros before landing it in Vue Vapor.

from core-vapor.

Ubugeeei avatar Ubugeeei commented on May 13, 2024 1

I'm trying..

https://github.com/Ubugeeei/vuejs-core/tree/feat/component-props

from core-vapor.

Ubugeeei avatar Ubugeeei commented on May 13, 2024 1

I've probably implemented the basic functionality, so once I refine it a bit more, it seems like I'll be able to submit a PR.

Unlike the render function of traditional components, which generates new rawProps and patches them each time, we need to find a way to always get the latest values of the original props.
I tried implementing this by modifying the traditional initProps function and defining a getter using Object.defineProperty, but I wonder if there's a smarter way to do this. 😵‍💫

I'll raise a PR soon for a bit of discussion...

from core-vapor.

Ubugeeei avatar Ubugeeei commented on May 13, 2024

@sxzz
I've written a few drafts, but regarding the design of Props, has there been any discussion within the team, or is there a planned time to discuss this?

from core-vapor.

sxzz avatar sxzz commented on May 13, 2024

It's too long, and I haven't had enough time and read it yet...

from core-vapor.

Ubugeeei avatar Ubugeeei commented on May 13, 2024

Oh, I'm sorry for rushing you, I understand.
I'll wait until there's some progress! 💪🏻

from core-vapor.

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.