Replies: 120 comments 562 replies
-
I advise you to take a look at the following signal implementations: artalar/act, nanostores/nanostores. |
Beta Was this translation helpful? Give feedback.
{{title}}
{{editor}}'s edit
{{editor}}'s edit
-
Amazing. Can't wait to see the prototype |
Beta Was this translation helpful? Give feedback.
-
Thank you for the transparency. I've taken a look at the code and "WOW!". This specific test puts a smile on my face. |
Beta Was this translation helpful? Give feedback.
-
Here are a few libraries you may find interesting for the prototyping phase: https://github.com/damianstasik/awesome-reactivity |
Beta Was this translation helpful? Give feedback.
-
I would also add Effector to the list https://github.com/effector/effector |
Beta Was this translation helpful? Give feedback.
{{title}}
{{editor}}'s edit
{{editor}}'s edit
-
I do not like dirty functions (functions with the internal state, AKA “hooks”), I think that functions should be pure and for keeping the state we have class instances. So, the fact the “hooks plague” is corrupting Angular is bad news for me, but if it will help us to get rid of zone.js - amazing. Because zone.js is much worse. |
Beta Was this translation helpful? Give feedback.
{{title}}
{{editor}}'s edit
{{editor}}'s edit
-
So basically after 7 years of development you figured out that RxJS is "doesn't fit all the needs" huh? |
Beta Was this translation helpful? Give feedback.
{{title}}
{{editor}}'s edit
{{editor}}'s edit
-
Angular is the best framework |
Beta Was this translation helpful? Give feedback.
-
Exciting development. Thanks for all the work and for the team's transparency along the way. |
Beta Was this translation helpful? Give feedback.
-
I hope it will not have too much impact on the existing development model. |
Beta Was this translation helpful? Give feedback.
-
Awesome! |
Beta Was this translation helpful? Give feedback.
-
I kinda want to stress-test this RFC with some questions that the Angular team may want to consider:
Those are just some questions I can think of at the moment, and I'll update this comment when I think of more questions. I am sorry being a pessimist with this RFC, and I am not trying to shoot this RFC down; however, RxJS is a critical part of Angular, and replacing it will cause millions of websites to break if this RFC is not handled carefully. If this RFC goes through, I would suggest creating an extended LTS version or a compatibility mode, so websites have a good window of time to migrate before the pre-RFC versions sunset. |
Beta Was this translation helpful? Give feedback.
{{title}}
{{editor}}'s edit
{{editor}}'s edit
-
Thank Angular team! I have been watching the progress of optional zone for many months. It is fantastic to adopt signal fine-grained reactivity to Angular core. Will the signal be able to run outside of component like Solidjs? If it does, that will be super helpful to reuse/organize many common logics. |
Beta Was this translation helpful? Give feedback.
-
wow congratulations |
Beta Was this translation helpful? Give feedback.
-
Should be a great addition! I guess it might change how we look at state management. Is there any thought how signals can enhance state management? Or maybe even a native angular solution? |
Beta Was this translation helpful? Give feedback.
-
the problem with that is that you just can’t see code organization as a problem. You’re talking about attacking “real” problems, get things done. Quickly. Forcefully.
But it’s not how the reality is. In reality first come codebase. Already existing code base which already do something. And the business consider it's working fine.
Then they throw at you problems. And you need to code them. All while keeping previously established correctness of your application intact.
So reality is not implementing new features, no! Far from that! Reality is CONTINUOUS REFACTORING. And for that you need to keep your code in certain state,
Always ready to be refactored. And this state is what they call "referential transparency”, keeping everything in pure functions. Or FP.
And when you see reality in this light you will see that this “pure” code organization will also lead you to “correct” implementations of your problems.
Not the other way around.
(But yeah, I’m talking about real programming, not about those cases when you just every time rewriting everything from scratch in what fashionable at the moment manner)
… On Mar 10, 2023, at 5:07 PM, Timon ***@***.***> wrote:
Are we now philosophers? Is it really a discussion about signals in angular anymore?
I think there are real world apps that are roughly at this level of complexity and for that I would consider anything that is not straight forward to implement over engineered. Since I am interested in how it is practical in the real world.
—
Reply to this email directly, view it on GitHub <#49090 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAMUAE6Q2WXJPIDULO6Z54DW3M7UJANCNFSM6AAAAAAU5H2RGI>.
You are receiving this because you were mentioned.
|
Beta Was this translation helpful? Give feedback.
-
I'm just replying to comments in my email. It says “ Reply to this email directly”. So I do.
but ok, I think I made my point. I will probably unsubscribe now as this will not lead to anything and not exactly interesting to me anymore
… On Mar 10, 2023, at 5:16 PM, Clara Castillo ***@***.***> wrote:
@robounohito <https://github.com/robounohito> it's really hard to follow a discussion if you make a new comment every single time. Just reply directly to the comment you want to anwer to... Now the whole thread is cluttered...
—
Reply to this email directly, view it on GitHub <#49090 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAMUAEZEJDLUXMTOLGQNXRLW3NAWRANCNFSM6AAAAAAU5H2RGI>.
You are receiving this because you were mentioned.
|
Beta Was this translation helpful? Give feedback.
{{title}}
-
tl;dr: we've begun some prototyping work around adding signals as a reactive primitive in Angular, in advance of a formal Request For Comments (RFC) which we plan to open soon. Prototyping early and in the open aligns with our team values and allows us to get the most out of an RFC.
If you've seen our talk from ng-conf 2022, Angular: A Design Review 10 Years Later, you know we've been thinking long and hard about some fundamental design decisions of the framework. Last year, we kicked off a long-term research project with an ambitious goal: to embrace fine-grained reactivity in the core of the framework.
In a fine-grained reactive web framework, components track which parts of the application's data model they depend on, and are only synchronized with the UI when that model changes. This is fundamentally different from how Angular works today, where it uses zone.js to trigger global top-down change detection for the whole application.
We believe adding built-in reactivity to Angular unlocks many new capabilities, including:
ExpressionChangedAfterItHasBeenChecked
errors.Changing the reactivity model of an established framework like Angular is a significant project, with numerous challenges. Our plan for this project is broken out into multiple phases:
Over the last few months, we've progressed through the first and second stages of this project, and have converged on a design based on the well-known reactive primitive of signals. During our experimentation we felt that this design demonstrated the strongest alignment with our overall goals.
Signals are not a new idea in the framework space - Preact, Solid, and Vue all employ some version of this concept to great success. We've taken a lot of inspiration from these and other reactive frameworks, and we are especially grateful to Ryan Carniato of SolidJS for his willingness to share his expertise and experience in many conversations over the last year.
That said, requirements across frameworks differ widely, and we've designed our version of signals to both meet Angular's specific needs and as well as take full advantage of Angular's unique strengths. Even though it's still in the prototype stage, there are a few aspects of our design which we're particularly proud of:
WeakRef
to avoid explicit lifecycle management of signalsWe've begun prototyping this design and will be integrating it into Angular over the next few months. We're committed to our open source spirit and plan to conduct these prototyping efforts in the open. This prototyping is essential to proving that our design for signals in Angular is viable and allows us to progress to a community RFC. The RFC will cover the rationale for using signals and the detailed design of various parts (our implementation, integration with RxJS, and other topics related to this effort).
We strongly believe that adding built-in reactivity to Angular is in the long term best interest of the framework and its users, and look forward to sharing more information about this project in the upcoming RFC.
FAQ
When will the RFC be?
Sometime later this year, depending on how smoothly the prototyping efforts progress.
Why signals as the reactive primitive?
This is a great question, and one which will be thoroughly discussed in the upcoming RFC. In short, signals have many of the properties we identified as desirable in a reactivity system designed for Angular, including:
Why are you committing code before the RFC?
There are a few reasons why we've chosen to begin prototyping before opening an RFC:
We feel having a real prototype will amplify the value we can gain from an RFC, as we will be able to share more detailed designs and ask more precise questions.
In any major design, there are challenges and constraints which only become visible at the scale of a full prototype. We want to uncover these and account for them in the RFC itself.
Many technical problems are unrelated to the overall reactivity system design (such as how it will integrate into Angular's change detection algorithm). We want to tackle these problems sooner rather than later.
Google's internal codebase has a different set of build tools and constraints than the external ecosystem, and early prototyping is necessary to validate our designs in that environment as well.
Beta Was this translation helpful? Give feedback.
All reactions