Git Product home page Git Product logo

Comments (6)

markostanimirovic avatar markostanimirovic commented on September 28, 2024 6

I updated the RFC description with more details:

  • The withProps factory function would accept previously defined state signals, computed signals, and properties.
  • withComputed, withMethods, and withHooks would accept previously defined properties.

from platform.

GuillaumeNury avatar GuillaumeNury commented on September 28, 2024 5

This would be useful!

Can props be private the same way state/computed/methods are?

from platform.

rainerhahnekamp avatar rainerhahnekamp commented on September 28, 2024 3

Yes, that would be an addition, we definitely should have. Just two questions:

  • Do we now have constraints for the property type, or can it be anything?
  • You stated that the factory function gets the existing slices and computeds. I guess it would also get the previous props? Why do we not pass the methods as well?

from platform.

k3nsei avatar k3nsei commented on September 28, 2024

As suggested something like this last week on discord when talking with @rainerhahnekamp. It would be super useful to open many new capabilities and to avoid hacks with Proxy applied on method in withMethods.

Are there any more details about limitations and where those props would be exposed? I'm hopping to have access to them in withComputed.

from platform.

ducin avatar ducin commented on September 28, 2024

IMO it makes a lot of sense when integrating with libs/things from outside of angular ecosystem, which don't fit any of existing withState, withComputed etc.

The only thing which bothers me is the name - withProps. The "property" word doesn't outline what is the key here - being static. How about withStatic?

from platform.

k3nsei avatar k3nsei commented on September 28, 2024

@ducin thats why I also proposed alternative name withExplicit

Edited: Ahhh it was in other discussion

from platform.

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.