
Angular Signals RFC Discussion with the Angular Team
Angular Signals RFC Discussion with the Angular Team
Join the Angular Team for a live discussion and Q/A with the community as we dive into the new Signals API RFC.
Content
1.86 -> foreign
76.26 -> foreign
109.28 -> welcome to the signals RFC discussion
113.22 -> with the angler team my name is Mark and
115.38 -> I am joined by Pavel Alex Jeremy and
118.439 -> Andrew all from the angler team and we
120.659 -> are so so excited to be sharing this new
123.54 -> Milestone with you folks and we love all
126.479 -> the feedback we've seen tons of feedback
128.099 -> so far so we are pumped up about this we
131.099 -> see people coming in from all over the
133.02 -> world we've got folks from from Mexico
135.599 -> coming in Eddie good morning good
137.7 -> afternoon good evening good day to
139.14 -> everybody
140.819 -> let's look at this people love us
142.319 -> already hello to the angular team we
144.06 -> love you listen we love you all too we
145.98 -> love the Fantastic England Community
148.02 -> thanks thanks thanks
149.819 -> yeah I see Denmark Switzerland Paris
154.04 -> Denmark then from Berlin who was on the
156.78 -> angular team doesn't count
158.54 -> yes okay you're all the angular team as
162.42 -> well so many people
167 -> Peru Nepal Italy all right friends are
170.28 -> here from everywhere and while we would
172.68 -> love to shout out each of you
174.42 -> individually we're actually going to get
176.64 -> this conversation started and we're
177.959 -> going to kick things off with Alex
179.76 -> rickabaugh from the angular team he's
181.68 -> going to take us through the first part
183.18 -> of the Alex of the RC Alex take it away
187.68 -> all right thank you very much Mark yeah
190.14 -> welcome everyone
192.48 -> um so the the signals RFC is a fairly
195.72 -> big it's I think it's it is absolutely
198.12 -> the biggest RFC that we've done
200.28 -> um and we've split it up into four parts
204.78 -> um so we'll take you through each of the
206.519 -> parts
207.36 -> um I have the kind of privilege of
209.34 -> presenting the first one here
211.68 -> um so the first part of our RFC talks
214.14 -> about the choice to use signals for
216.78 -> reactivity in angular
219.3 -> um so it starts off with kind of the
222.48 -> value proposition right why are we doing
224.519 -> this now
226.08 -> um why did we decide that angular needs
228.06 -> a new reactive primitive
230.159 -> um so we talked a little bit about Zone
231.84 -> JS Zone JS is how reactivity and angular
234.48 -> works today
236.04 -> and zones has some
238.26 -> um really powerful capabilities actually
240.62 -> and some challenges that we see with it
244.379 -> um and essentially we call out here that
246.78 -> zones doesn't really give us information
248.879 -> about what changes in a component it
253.319 -> only tells us that something happened in
254.939 -> the application and then change
256.079 -> detection has to go in and kind of
257.579 -> figure out looking at the expressions in
259.979 -> your templates and evaluating things
261.479 -> from the top down figure out exactly
264.06 -> what it needs to update
266.34 -> um so one of our main goals here is to
270.6 -> introduce a reactive primitive that can
272.28 -> give us this fine-grained information
274.32 -> and that will allow us to do a few
276.36 -> things with chain detection and with
279.72 -> reactivity that aren't really possible
281.46 -> with the limited information that zones
283.38 -> gives us
285.78 -> um
286.74 -> so then we flow into okay if we want to
290.94 -> introduce this new reactive primitive
292.38 -> what do we need from it right what are
294.24 -> the requirements here
296.46 -> um kind of central is that it has to be
298.08 -> able to tell us about model changes that
299.94 -> affect specific components
302.759 -> um zones does not do this right zones
304.38 -> only tells us that something happened in
306.36 -> the application it doesn't tell us which
308.1 -> individual components were affected
311.28 -> um it has to be synchronous
313.68 -> and this is actually really a key one
315.54 -> right when you have a binding in a
317.58 -> template that binding is displaying
319.32 -> something in the UI it always has to
321.6 -> have a value to display
323.46 -> it doesn't make sense to have a binding
326.639 -> that says like you know at some point in
328.32 -> the future there might be text here
330.32 -> your UI should really always have values
333.06 -> in it
334.8 -> um reading values must be side effect
336.84 -> free
338.639 -> um
339.6 -> shouldn't like just binding something in
341.94 -> the template shouldn't trigger Network
343.199 -> effects or anything like that basically
345.36 -> this means it shouldn't be surprising
347.52 -> uh it must be glitch free I love that we
349.979 -> have a glitch in the formatting here
351.36 -> I'll have to fix that later
353.36 -> but reading these values should never
355.8 -> show you an inconsistent State and we
357.84 -> get into more into what that means
360.18 -> um down the road here
362.34 -> and dependency tracking should be
364.259 -> ergonomic that's another kind of key
367.5 -> Point here it should be fairly
368.88 -> straightforward to specify what your
370.5 -> template depends on
372.3 -> and we have our kind of our first
374.28 -> discussion Point we'd love to hear your
375.72 -> feedback is there anything missing from
378.3 -> this list
381 -> um so this has been an ongoing project
382.56 -> for us for a while
384.18 -> um we've done a lot of research in this
385.86 -> area
386.699 -> and we've played around with different
388.44 -> you know a bunch of different solutions
390.419 -> we looked at can we make Zone JS better
393.479 -> um can we run you know individual
394.919 -> components in their own zones or things
396.66 -> like that
397.68 -> we looked at like set State style apis
400.56 -> we've looked at signals we've looked at
402.96 -> using rxjs for this we've looked at kind
405.419 -> of being fancier with our compiler and
407.52 -> doing better compiler-based reactivity
409.639 -> we've looked at proxy based approaches
412.94 -> and in the end we kind of found that of
416.639 -> all of these different solutions that we
418.38 -> tried we'd liked the experience that
421.74 -> signals provided the most
424.5 -> um and this is in some ways not
426 -> surprising
427.199 -> um
427.8 -> there are a number of other Frameworks
429.479 -> that have
431.22 -> um that do things with signals preact
433.139 -> and solid kind of more explicitly view
435.6 -> was very signal based under the hood
438.72 -> um and we see that works really well in
441.18 -> those other Frameworks so it's not
442.319 -> surprising that we found that we like
443.759 -> the experience as well
445.74 -> so what are signals
447.96 -> signals of wrappers around values so
451.139 -> they behave kind of like variables in
452.759 -> that sense but they have this extra
454.919 -> capability which is that they can notify
457.02 -> you when they're changed
459.599 -> um so we talk a little bit about the
461.4 -> signal concept
462.8 -> and how dependency tracking works we
465.539 -> talked about computed signals
468.02 -> computed signals are
470.639 -> signals that don't get their value set
473.16 -> directly
474.199 -> instead they kind of read other signals
476.759 -> and do computations and derive a value
479.36 -> from those other signals
481.8 -> and as a result computers can update
483.9 -> whenever any of their sources update
487.259 -> so we have an example here of like
489.24 -> counter is a good example of a writable
491.28 -> signal
492.56 -> is even
494.52 -> checks whether the counter is even is a
496.44 -> good example of a computed right you
498.479 -> don't want to update that directly every
499.8 -> time you change the counter you just
501.18 -> want it to
502.259 -> recalculate as needed
505.5 -> and we have this idea of effects
508.699 -> effects are kind of the end of the
510.84 -> reactive chain when we need to do
512.459 -> something in the real world when signals
514.8 -> change for example like updating the UI
517.86 -> of a component updating the Dom
524.279 -> so signals automatically track
526.2 -> dependencies which ends up being very
529.019 -> ergonomic because you don't have to
530.22 -> think about it all that much and this is
532.44 -> what allows us to kind of understand hey
534.62 -> you've changed some aspects of the model
537.06 -> which components are going to need to
539.279 -> update because they end up depending on
542.279 -> those things
544.5 -> so why does this work well for angular
547.92 -> well we have that fine-grained
550.38 -> information that we were looking for
551.519 -> right oh now which components were
553.92 -> affected whenever you make a change to
556.26 -> the model and that allows us to kind of
558 -> optimize the synchronization process
560.76 -> they are synchronous
563.16 -> great they don't trigger side effects
566.7 -> um
567.6 -> signal implementations are glitch free
569.519 -> so you'll never see a case where like
571.08 -> the counter is odd but is even says that
573.54 -> it's still even
574.68 -> or vice versa
576.959 -> they track their dependencies
578.279 -> automatically and they can be used kind
581.04 -> of across the board signals are not
583.2 -> something you can only use in components
585.36 -> you can use them in Services you can use
587.04 -> them in directives
588.44 -> they're not kind of limited in their
591.18 -> scope
592.8 -> we also see some other things that
594.42 -> weren't explicitly in our requirements
596.519 -> which we also like
598.459 -> computed signals can be lazy they can
601.019 -> only evaluate when they need to that
603.36 -> leads to some nice performance
604.5 -> characteristics
606 -> they're relatively few concepts for
607.86 -> developers to learn
609.54 -> and they're they play well with other
612.06 -> reactivity systems and that's important
613.98 -> to us because in angular we have rxjs
616.74 -> that people use to kind of trigger on
618.899 -> push change detection and angular's
621.6 -> current zone system interoperates well
624 -> with signals
626.519 -> so how's angular going to use signals
629.42 -> this section kind of talks about like
631.74 -> what what benefits are we actually going
633.6 -> to get out of this
635.64 -> um and it's a fairly big change they
637.32 -> affect quite a few aspects of the
639.12 -> framework
640.86 -> um and we start off by kind of talking
643.38 -> about the interop with zones right
645.6 -> zones and signals will need to work
648.12 -> together even though they have very
650.519 -> different assumptions about how dataflow
652.14 -> works and that's an interesting problem
653.579 -> to solve
655.56 -> um
656.76 -> so we think the right boundary here is
659.16 -> to how is to
660.98 -> switch the reactivity models on the
663.6 -> component level
664.92 -> so we will have signal components and
667.32 -> Zone components and I I'll say component
670.14 -> here but really directives
671.899 -> also kind of follow the split
674.82 -> and you'll be able to use both in the
676.86 -> same application you'll be able to have
678.36 -> signal components with Zone children and
680.399 -> vice versa
681.56 -> and this allows you to kind of gradually
684.06 -> if you want start using signals for new
686.519 -> components start converting existing
689.1 -> components one at a time to signals
691.64 -> and for libraries in particular you know
694.32 -> being able to convert your libraries to
696.3 -> signals in a backwards compatible way
700.62 -> um so the big kind of new selling point
704.16 -> of signal components is local chain
706.079 -> detection
707.16 -> being able to do change detection that's
709.019 -> not dependent on this top-down zone.js
711.839 -> traversal
713.459 -> um and that works because there is only
715.079 -> one way to trigger change detection in a
717.18 -> signal component which is to change a
719.22 -> signal that the template depends on so
721.74 -> we call this the golden rule of signal
723.54 -> components
725.3 -> and in fact we're going to do change
727.44 -> detection even narrower in scope than
730.68 -> specific components
733.14 -> um we're going to change detect
734.579 -> individual views
736.38 -> so if you're not familiar with views in
738.18 -> angular this section kind of goes into
739.92 -> some details of what a view is
743.06 -> effectively it is a static set of UI
747 -> so for example this whole template is
749.04 -> one View
750.24 -> but if I add an ngf in here then I kind
753.66 -> of get an X an outside View
755.82 -> which is the div and the labels and then
758.459 -> I the ngif body is a separate View
761.779 -> and that's useful because even in a like
764.459 -> something like a for Loop every row of
767.399 -> the for Loop is a separate View
769.5 -> which is really nice when you think
771.06 -> about local chain detection because it
772.62 -> means we can change detect each row of a
774.66 -> table separately if we need to
777.36 -> um and there's some argument here as to
780.18 -> why we're doing purview change detection
782.94 -> we could have done
785.22 -> deeper right we could have said oh we're
786.899 -> going to change attack to each you know
788.82 -> element individually or even each
790.56 -> binding
791.76 -> and why did we pick Vue right
795.899 -> um we picked view because we think it's
797.639 -> the best trade-off
799.2 -> we think it gives most of the benefit of
802.2 -> tracking in a very fine-grained level
804.079 -> and because it composes really well with
807.36 -> the Zone chain detection model because
809.579 -> these things need to work well together
811.38 -> in the same application it makes sense
813.72 -> to have them kind of both functioning at
815.579 -> the same level of granularity
818.76 -> so the next kind of really nice feature
822.12 -> of signal components is that you get
823.74 -> signal inputs
826.139 -> um inputs are things that can change
828.36 -> over time and so using a signal for them
830.579 -> is fairly natural
832.5 -> and this has some really nice properties
836.22 -> so in zone applications
839.1 -> when you bind to an input this
842.1 -> expression gets evaluated during change
844.2 -> detection
845.519 -> which is actually kind of late in the
847.8 -> life cycle of making an update
850.44 -> um and this is why angular has these
853.5 -> like expression change after checked
855.3 -> errors
856.62 -> um that end up being kind of you know
858.66 -> fairly well known
860.579 -> uh because when this input changes you
864.18 -> are kind of changing the model of the
865.74 -> downstream component in the middle of
867.24 -> change detection and that means you're
868.56 -> sensitive to the order in which things
870.779 -> are checked
872.22 -> signal inputs don't really work that way
874.519 -> when you have a binding to an input and
877.079 -> a signal component assuming you're you
879.48 -> know using all signal components and not
881.519 -> don't have Zone components in the mix
883.38 -> these bindings behave as computed
885.6 -> properties
886.98 -> so this user profile component is
890.16 -> receiving the user data as a computed
892.139 -> expression of this thing
893.88 -> which means this parent template
895.62 -> actually doesn't depend on this data at
897.72 -> all
899.16 -> so signal inputs resolve kind of before
902.699 -> the whole change detection process
904.139 -> starts
905.88 -> um which is nice because it kind of
907.74 -> dramatically reduces the risk of
909.779 -> expression change after it's checked
911.839 -> because you kind of fully synchronize
914.22 -> all of your inputs before you even start
916.019 -> the change detection process
918.899 -> um input bindings won't trigger change
921.24 -> detection of The Binding component
922.74 -> that's kind of nice
924.18 -> they also don't automatically trigger
927.12 -> change detection in the component that's
928.74 -> getting the input only if you use that
931.26 -> signal in the template right that's the
932.94 -> golden rule of signals
936.36 -> so in addition to inputs queries or
938.579 -> signals that's kind of Fairly
941.22 -> straightforward queries already have the
943.139 -> query list and the changes you know
945 -> observable that tell you when the query
946.86 -> updates it's natural and Signal
949.5 -> components that they would just be
950.579 -> signals
951.959 -> and yeah you can freely mix signal and
955.199 -> non-signal components in the same
956.579 -> application even in the same template if
958.32 -> you'd like
959.18 -> As Long as You observe this Golden Rule
961.98 -> of signal components right that you have
963.66 -> to set a signal to change affect them
966.199 -> change detection should work in between
968.459 -> them
970.5 -> there are some kind of caveats there
972.72 -> there are certain apis that kind of
975.12 -> assume Global change detection is going
977.579 -> to happen
978.68 -> NG model is one such example
981.899 -> if you take an NG model directive and
984.72 -> get a reference to it and just write out
987 -> the value
988.079 -> this doesn't work in a signal component
990.12 -> right you are not reading a signal here
992.279 -> so you're not causing change detection
994.38 -> to happen
997.079 -> um yeah and the last kind of nice thing
1000.8 -> is
1002.6 -> um if you manage to convert your
1005.12 -> application entirely to use signals you
1007.699 -> get the benefit of being able to switch
1009.32 -> off zone.js entirely
1011.36 -> to not ship this Library
1013.94 -> and use it at bootstrapping time which
1016.459 -> is a you know it's Zone JS is not a
1019.579 -> trivial amount of code so there are some
1021.86 -> real wins there
1024.62 -> so that's kind of it for the first RFC
1026.959 -> there are some FAQs I think I probably
1030.319 -> won't go through them and hand over to
1032.36 -> Pavel to talk about the
1035.059 -> um Alex right before you do that
1038.24 -> yeah we have a few questions that I
1040.64 -> think would be good to just touch on
1042.26 -> before we move to the next RFC all right
1044.959 -> let's start with the first question from
1047.36 -> Pablo
1048.62 -> is unit testing going to change with
1051.799 -> signals
1053.24 -> it probably will
1055.94 -> um one of the challenges with unit
1057.559 -> testing today is kind of having to
1060.2 -> manually detect changes or flush
1064.039 -> um
1064.94 -> because you're kind of running outside
1066.919 -> of a browser context where zonejs is
1068.96 -> helping you we think signals can be an
1071.36 -> improvement here it's largely an
1073.76 -> unexplored area in our design
1075.86 -> I would not be surprised if we had
1078.08 -> another RFC in the future related to
1080 -> testing specifically
1082.94 -> so stay tuned
1084.74 -> all right uh we might have to come back
1086.84 -> to this one from stennis law which says
1088.64 -> awesome should we expect some react like
1091.4 -> hooks or even function based components
1094.039 -> I think we should save this question
1096.02 -> yeah the third RFC talks about like what
1098.539 -> does this look like in actual components
1100.52 -> so I think we'll okay we'll come back
1102.86 -> stanislaw we're going to come back to
1104.24 -> your question I'm going to save it don't
1105.559 -> worry we care about it all right so
1108.08 -> here's what Marcus says I've read RX
1110.419 -> glitches aren't actually a problem and
1112.46 -> that it's rather a result of non-optimal
1114.86 -> coding style it's free from glitches
1117.22 -> prioritized because glitch is still seem
1119.48 -> to appear regularly in the wild
1124.1 -> yeah so maybe it would be useful to talk
1126.08 -> about glitches specifically
1128.78 -> um
1129.44 -> and there's a whole section in the the
1131.48 -> frequently asked questions here on rxjs
1133.94 -> and glitches
1135.799 -> um
1136.4 -> but
1138.74 -> it's it's fairly easy to demonstrate
1141.679 -> glitches in rxjs
1143.9 -> um so here we have a counter Behavior
1145.64 -> subject we have is even that pipes it to
1149.12 -> basically a true or false depending on
1151.28 -> whether or not it's even
1153.44 -> um and then we use combine latest to
1155.12 -> make this message
1156.5 -> right which takes the value of both of
1158.48 -> these observables and produces this
1160.58 -> message that says you know the counter
1162.26 -> is even or odd
1164.48 -> um and if you subscribe to this thing
1166.34 -> and then next it an odd number
1170.12 -> you actually get three logs not two you
1173.24 -> get the zeros even you get the one is
1174.919 -> odd but in the middle you get this one
1176.6 -> is even
1177.86 -> and
1179.84 -> that's because when you next to the
1181.82 -> counter combine latest runs Twice first
1184.22 -> when the counter updates and then one is
1185.9 -> even updates
1187.82 -> um
1188.66 -> this is not surprising to anyone who's
1190.88 -> worked with rxjs
1192.62 -> and it's actually not even I would not
1195.2 -> say this as a bug in rxjs right
1197.6 -> this is not something that RX is doing
1199.34 -> wrong
1200.36 -> this is more an artifact of rxjs is
1204.38 -> based on streams of events
1207.32 -> right when you next counter you're
1209.48 -> basically triggering an event in the
1211.039 -> system that says the counter is updating
1212.74 -> and everything else is processing that
1215.24 -> event
1216.14 -> and so combined latest is doing exactly
1218.66 -> the right thing here
1220.28 -> it receives two different events and it
1222.26 -> runs its message processing you know it
1225.08 -> creates the message twice
1226.76 -> the message subscript subscriber runs
1228.799 -> twice
1229.94 -> what the glitch here is
1234.26 -> is when you're trying to use this event
1236.48 -> system to represent synchronous state in
1239.84 -> the application when I have these two
1242.24 -> things which really aren't separate
1243.98 -> event streams but are trying to
1246.02 -> represent one unified state
1248.84 -> then this results in kind of these
1252.44 -> intermediate events that don't really
1254.84 -> fit
1255.98 -> the
1257.48 -> model that we want to show in our UI
1259.58 -> right they don't represent kind of a
1261.559 -> settled state of the application they're
1264.32 -> in progress computation
1267.919 -> um so it's really adding
1270.44 -> trying to use event streams to represent
1275.059 -> synchronous state where you run into
1277.46 -> these kinds of you know glitch problems
1279.44 -> and you can always refactor this rxjs
1281.6 -> code to not have this issue
1284.72 -> um you can use like with latest from I
1286.76 -> think instead of combine latest
1288.94 -> but this is something you do have to be
1291.559 -> aware of if you're using
1293.48 -> a event-based system to model state
1296.72 -> okay let's see if we can uh go through a
1298.94 -> couple more questions before we move to
1300.38 -> the next RFC okay so Sigma allows CD per
1304.039 -> view so I guess change detection per
1305.72 -> view not per component right so which
1309.559 -> seems finer grains so is this better so
1312.679 -> just to clarify for folks what do you
1314.9 -> mean by change detection per view and
1317 -> not per component
1319.28 -> yeah so today when angular runs change
1321.98 -> detection we're actually kind of here
1324.02 -> right
1325.7 -> um we are running every template in the
1328.28 -> application evaluating the bindings and
1330.74 -> checking you know did this change do we
1332.78 -> need to do some update in the browser in
1334.7 -> the Dom
1335.539 -> based on the new value of The Binding
1338.74 -> and that process happens by kind of
1341.299 -> going down through all the components in
1343.22 -> the application and then all of the
1344.84 -> views within all of the components
1347.179 -> and checking each one all of the
1350.059 -> bindings in that particular View
1351.98 -> so with signal components we actually
1354.7 -> can be much more specific about which
1358.039 -> views need to be checked
1359.9 -> because we know we know which views
1362.659 -> potentially have changes and which views
1365.78 -> could not have been affected when you
1367.22 -> set a signal
1371.6 -> so we can make change detection more
1373.7 -> efficient it can do less work in order
1376.1 -> to update the UI
1378.32 -> correctly as the result of a model
1380 -> change
1381.22 -> finer grained is not always better
1385.78 -> so one of the kind of points that we
1388.4 -> make here is this dependency tracking
1390.02 -> actually is not you don't get it for
1392.419 -> free right being able to know
1395.12 -> specifically which tiny little thing
1396.919 -> changed adds a lot of overhead
1399.98 -> and so we specifically don't want to get
1402.5 -> into like let's check each binding
1405.14 -> separately because that might require
1407.78 -> too much memory too much you know
1410.36 -> bookkeeping of knowing which
1413.419 -> um what the dependencies of each
1415.1 -> individual expression are and you don't
1417.38 -> really get a lot of benefit in checking
1419.78 -> and updating a specific binding versus a
1422.72 -> specific View
1424.039 -> there's a much bigger change going from
1426.08 -> like the whole application to individual
1427.94 -> views than there is going from
1430.039 -> Individual views to individual bindings
1434.2 -> all right Alex thanks so much now we're
1436.94 -> going to jump over to Pavo Pablo's going
1438.919 -> to share uh
1444.74 -> cool all right
1446.96 -> thanks I just can't believe that we are
1449.539 -> sitting here in front of the city of sea
1451.7 -> because literally we've been discussing
1453.5 -> those apis for months
1456.44 -> um so Alex was painting the picture like
1459.86 -> a broad picture of how signals fit into
1462.08 -> angular and the uh in the entire change
1465.26 -> detection on other subsystems but what
1468.74 -> are those signals right like how do we
1470.36 -> create them how do we respond to the
1472.58 -> changes
1473.659 -> so that's the second suburb see where we
1476 -> specifically dive into the all the apis
1478.76 -> that you've been we will be using uh and
1481.64 -> how they behave and the good news here
1483.32 -> is before like I start scrolling through
1485.059 -> RFC is that like there are really only
1487.159 -> three fundamental concepts uh in the API
1490.28 -> surface right I've got signals which is
1491.96 -> computed we've got effects so we went
1496.4 -> into very detail like we described every
1499.76 -> single uh option that you've got the API
1502.4 -> but it's good to keep in mind that at
1504.5 -> the end of the day there are just like
1505.76 -> three fundamental concepts here
1508.159 -> okay so obviously the signal is the at
1511.76 -> the center of the stage and it is a very
1515.02 -> uh small
1518.059 -> um API it's essentially is something
1520.22 -> that you can ask for a value we've
1522.559 -> chosen to use Getters to say like hey
1524.539 -> give me that the latest value
1527.12 -> and on the framework level we also added
1529.7 -> uh
1531.38 -> um a symbol branding query symbol so we
1534.62 -> know in the inside the framework that
1536.539 -> this getter function is a signal
1539.9 -> so that's really this getter is the one
1545.12 -> and Central Central concept
1548.9 -> um so how do I uh create signal while I
1553.46 -> mean
1554.419 -> maybe before creating
1556.76 -> um
1557.419 -> you can ask for the value from the
1559.64 -> signal but the question is like how do I
1562.64 -> update the value right like if I if I
1565.46 -> would be asking for the value it would
1566.659 -> always be the same then it's not very
1569 -> interesting as the concept so we do have
1571.82 -> a
1573.38 -> um specialized type of con of signals
1576.02 -> that we call writable signals those are
1578.419 -> the signals that you can update value
1580.64 -> and fundamentally there is one operation
1584.179 -> on the price table signal which is set
1586.58 -> it's like oh I'm going to give this
1589.52 -> primitive a new value so when someone
1591.799 -> asks again I can give you this new value
1594.799 -> and notify anyone interested that there
1597.32 -> is a new value
1598.88 -> and what I wanted to highlight here that
1601.58 -> this writable interface is broader than
1603.98 -> the set method there is also an update
1606.44 -> method and mutate method and people will
1609.08 -> uh when we were chatting initially about
1611.48 -> those apis people were asking oh like
1613.34 -> why do we have so many methods to change
1615.08 -> the value of the signal so I just wanted
1617.84 -> to say that the set is the fundamental
1619.88 -> operation and the rest of the apis here
1623.539 -> are just pure convenience and I will
1625.52 -> show you in a bit
1628.279 -> now I can create those writable signals
1632.659 -> by calling while signal creation
1636.2 -> function signal gets image of I do I can
1639.62 -> replace it and again there is another
1642.44 -> way of setting full update we will have
1645.08 -> a we will have a example of how you can
1648.62 -> write update full set
1651.46 -> we we do call out
1655.4 -> um
1656.36 -> and naming discussion around signals
1658.88 -> that we had so what we are essentially
1661.64 -> saying that the signal as the concept
1664.88 -> is this thing that you can ask for the
1666.86 -> new value the writable signal is the
1669.5 -> specialized version of it but then you
1672.919 -> know you might say and rightly so that
1674.779 -> like oh so why you are using signal
1676.58 -> creation function to create a writable
1678.919 -> signal so we go into this discussion
1682.1 -> it's not ideal in terms of naming and
1684.74 -> understanding of the concepts but it
1686.72 -> also was very we used the short names
1689 -> and the very convenient names so there
1691.46 -> is this bit of trade-offs here
1695.419 -> um
1697.58 -> right so so there's this whole
1699.32 -> discussion about the naming
1701.299 -> um we can you can like have a look at it
1703.94 -> and and give us your thumbs up thumbs
1707.84 -> down or opinion other Alternatives then
1710.96 -> again uh when we create a signal we can
1713.419 -> pass the initial value but we also can
1716.36 -> specify how signals think about equality
1719.24 -> right like so we can pass a specialized
1721.88 -> equality function uh so when I call it
1725.12 -> set
1726.74 -> um
1727.64 -> the signal will consult these equality
1729.98 -> functions like okay you're giving too
1731.419 -> many value that it really change if not
1733.94 -> then like I'm going to ignore you but
1735.799 -> like if it changed I'm going to
1737.059 -> propagate this notification of the chain
1740.539 -> um so that's one of the options on the
1741.98 -> signals
1744.44 -> uh there is a part that says again like
1747.08 -> the dot set is the the fundamental
1749.299 -> operation that changes the signal value
1751.279 -> and there is a section just showing that
1754.1 -> update is the convenience you can always
1757.1 -> like you can if you if you prefer you
1759.44 -> can ignore it and say like hey you know
1761.059 -> like the update
1763.52 -> type of mutation can be also expressed
1766.76 -> for a get
1769.46 -> um so we are calling out you know like
1772.58 -> that that's the kind of calling half
1774.919 -> discussion Point here do we want to have
1777.74 -> it update it's a new API surface it's
1780.799 -> convenient but maybe you know it's
1782.48 -> another thing to learn
1784.279 -> um
1785.6 -> the third way of changing the value of
1788.72 -> the signal is
1790.94 -> um something called documented
1793.039 -> uh and this is slightly different
1794.899 -> compared to set and update it's actually
1797.62 -> uh makes sense only for signals that
1800.179 -> hold bigger objects like arrays or uh
1803.24 -> you know like a Jesus that you might
1804.559 -> have pulled from the server
1806.84 -> um and it gives me ability to mutate
1809.84 -> object in place but still notify the
1812.96 -> whole system that something changed
1814.7 -> right like so in this sense signals do
1817.22 -> not require people to use immunable data
1819.559 -> which again will leave this Choice
1823.1 -> um to people
1825.679 -> now
1827.36 -> um there is the large tank of this um
1831.38 -> signal API devoted to how we
1836.559 -> how we decided or like how we present it
1840.62 -> as our favorite that the signal is
1842.899 -> represented by the getter function
1845.26 -> and we go into the very
1848.84 -> fine details of those decisions but
1851.48 -> honestly we've spent months and months
1853.94 -> agonizing about those choices there are
1856.88 -> trade-offs so I just won't go through
1859.34 -> all of them but we looked at the at the
1862.64 -> getter functions we obviously looked at
1865.279 -> the dot value that other signal
1867.52 -> libraries choose we use we looked at the
1871.52 -> usage of decorators that was very common
1873.98 -> question in the pre-rfc people were
1875.84 -> asking like okay why not decorators
1878.84 -> um so we were trying to provide some
1880.58 -> information in there
1882.799 -> um there is another API that is used by
1885.5 -> uh solid GS and might be familiar for
1888.38 -> people uh using react this doesn't work
1892.1 -> for classes so we kind of discarded it
1895.1 -> rocks and so on so there is a big big
1897.5 -> chunk of this RFC we just we know that
1900.679 -> people
1901.539 -> have preferences in terms of syntax and
1904.34 -> and effectively some of the syntaxes
1906.919 -> work in certain situations better so we
1909.26 -> just wanted to uh put on the table all
1912.14 -> the considerations that we've been going
1913.58 -> through so people like with with all
1916.22 -> those considerations on the table can
1918.38 -> kind of have more informed
1921.46 -> preferences cool as soon as we know what
1924.559 -> the signals are the rest is like really
1926.48 -> simple
1928.039 -> um because there is this concept of
1930.5 -> computed signals which essentially
1932.98 -> derive the value
1935.5 -> based on the dependencies right like so
1937.82 -> I can have a computation function here I
1940.34 -> can reference any other signals and they
1942.919 -> will be my dependencies when one of my
1944.96 -> dependencies change
1947.24 -> um then the computation function runs
1949.82 -> again right like so so this is this very
1951.679 -> efficient computation in the sense that
1953.36 -> the only reruns or or it recomputes only
1956.72 -> if one of the dependencies changed so
1959.059 -> one of the things we hear is like oh you
1961.159 -> know I'm afraid of calling functions 12
1962.899 -> and especially in Android templates
1964.399 -> because maybe the computation will run
1966.02 -> too often that's not the case here right
1967.88 -> like the computation runs only when one
1969.679 -> of the depends is changed
1972.34 -> computed has very simple signature I'm
1975.2 -> providing the whatever the function that
1977.24 -> does the job and I can also provide a
1979.76 -> Quality Function right like because what
1981.559 -> might happen is that
1983.98 -> uh
1985.52 -> you know there is even number here if I
1989.12 -> set the counter to I don't know to
1991.22 -> number one then obviously there is even
1993.14 -> will change but if I set it to two it
1996.32 -> still is even so this computer didn't
1998.96 -> change so it does not to have like kind
2001.419 -> of frequent the other dependencies here
2003.76 -> so so computers also have this notion of
2006.1 -> equality and this equality can stop
2008.679 -> propagation of
2011.08 -> um of this notification in the system
2014.32 -> that's something changed
2017.919 -> um what about what more about computers
2020.98 -> they are really really straightforward I
2022.899 -> think what we are calling out here that
2025.299 -> um those computation functions should be
2027.159 -> like those small pure functions we are
2030.22 -> having some tags in place so if you
2032.38 -> create trying to create another computed
2034.419 -> from a computed
2036.519 -> um we will rise a warning
2039.7 -> we obviously cannot detect all the
2041.86 -> challenges where computed might get into
2044.26 -> the mutation business and thus all maybe
2047.44 -> do some side effects but uh we will keep
2051.04 -> highlighting that the computation
2052.3 -> function should be pure
2057.04 -> um the current implementation of signals
2060.099 -> is has some nice property or at least
2062.5 -> that the properties that we like a lot
2064.3 -> so our computations are lazy so I've got
2067.54 -> this computation function it might have
2069.159 -> dependencies
2070.839 -> but the computation function will not
2072.94 -> run if no one reads it right if no one
2075.76 -> is interested in the completed value we
2077.56 -> will never compute it so we are trying
2079.419 -> to defer work as uh to as light as
2081.76 -> possible
2083.04 -> computations don't have to be like
2085.659 -> destroyed in an explicit way and Alex
2088.3 -> mentioned glitch free
2092.94 -> batting I don't think I will talk about
2096.04 -> it that much Okay the third API and the
2098.859 -> final one uh there is an effect so
2100.96 -> computation you can think of the
2102.4 -> computation as like uh produce a new
2105.82 -> signal one of one of the advances change
2108.16 -> or do computation when one of the
2110.56 -> dependencies changed effect is kind of
2113.28 -> poorer version of it in the sense that
2116.079 -> uh it just like will run some code in
2119.02 -> response to dependencies change but
2120.88 -> without producing a new value and
2123.16 -> effects are really this end of the
2125.56 -> reactivity uh story right like those are
2128.26 -> useful to log something to the console
2130 -> or maybe right to the Dom or do the
2131.98 -> network effect but they are not supposed
2133.9 -> to be
2135.099 -> uh that like meaningful those are leaves
2138.339 -> in the in the interactive graph
2141.88 -> so again very simple example I can
2146.32 -> do work like I can specify that do work
2149.02 -> function for the FX and again this is
2151.72 -> the this is the the primary API again if
2154.599 -> I call one of the signals in this dual
2157.06 -> work function tells signals will be
2159.4 -> considered as dependencies Effect 3 runs
2162.22 -> only when
2163.9 -> um
2164.619 -> one one of the dependencies changed so
2167.74 -> again I mentioned that there are wide
2169.48 -> variety of usages
2171.94 -> uh what is good is that you can return a
2176.44 -> cleanup function from an effect so since
2179.98 -> effect is like do some work function you
2183.46 -> might start the work and while the work
2186.099 -> is in progress on your dependencies
2188.14 -> might change and then FX is like okay
2190.359 -> well like what should I do I've got some
2192.099 -> working progress and you are telling me
2193.54 -> to start some more work I cannot handle
2196 -> too much at one time so you you like
2198.82 -> this returning the clamp function gives
2201.22 -> you ability to say like oh I'm stopping
2202.839 -> the work I've got current in progress
2204.339 -> and I will start the new one because
2205.78 -> I've got the new set of dependencies
2209.26 -> um
2210.24 -> the effects run when the dependencies
2214 -> change and that's the only guarantee
2216.88 -> that we make uh or like that we can give
2220.18 -> you in the library so you you are
2223.18 -> guaranteed that effect will run when
2225.339 -> dependence is changed and it will run at
2227.859 -> least two months but we are not
2229.48 -> specifying anything about the exact
2231.64 -> timing
2232.96 -> and more probably we will be changing
2235.9 -> this timing as the as the implementation
2238.48 -> and design progresses so I'm just trying
2241.48 -> to say that the exact timing on the
2243.579 -> effect run
2244.66 -> it's not that important and probably
2246.579 -> shouldn't be relied in onto
2249.94 -> cool
2251.44 -> um I think we're getting close to the
2253.3 -> end of the section we just well you can
2255.7 -> also destroy manually effects all right
2258.28 -> like you scheduled maybe some work but
2259.9 -> like finally say like oh I don't want to
2261.88 -> do it anymore
2263.56 -> um
2264.579 -> and you can explicitly stop then we did
2268.54 -> add on the pretty much last minute some
2270.579 -> of the uh checks for the effects to
2273.46 -> avoid common problems and one of those
2275.56 -> common problems is trying to write to a
2278.5 -> signal from an effect and the way we
2280.54 -> think about effect is this end of the
2282.4 -> reactivity story so it's kind of strange
2285.64 -> like okay we are saying the end and then
2287.74 -> like if you write to the signal then
2289.06 -> we're just kind of jumping back it's
2290.68 -> like so this potential of creating Loops
2292.54 -> here or other
2294.3 -> unintended data flow situations so
2296.92 -> that's why by default we will block
2298.96 -> right to the signal if you really
2301.18 -> believe that that's the desireable then
2303.64 -> you can pass the additional options
2306.76 -> there is more in the frequently asked
2308.38 -> questions there is good discussion going
2309.9 -> but I think that's the overview of what
2313.96 -> we've got here for the pure API and the
2316.42 -> functioning of this Library
2321.9 -> foreign
2328.32 -> do we have questions all right friends
2331.119 -> so friends at home thank you so much for
2333.099 -> submitting your questions we are keeping
2335.32 -> track of them we're going to try to
2336.46 -> answer as many as we can if we don't get
2338.5 -> to it in the segment that we're talking
2341.14 -> about we'll try to get to them at the
2343.24 -> end someone asked if we're going to be
2345.339 -> recording the session yes so you'll be
2347.5 -> able to watch the replay uh after we're
2350.2 -> done live the replay will be live on our
2353.02 -> YouTube channel so you'll be able to
2355 -> catch it there so we'll get to your
2356.44 -> questions if we answer them after you
2358.72 -> stop viewing we'll still try to answer
2360.339 -> them all right Pablo so many questions
2362.56 -> let's start with that's perfect
2365.02 -> okay let's start with this one uh
2366.82 -> template bindings must always have a
2368.859 -> current value how would we retrieve a
2371.26 -> use case like this one using signals for
2374.02 -> example showing the stock price change
2375.579 -> from a websocket
2377.56 -> right so so again uh when you create a
2380.859 -> signal you you have to give it a initial
2383.26 -> value right like so so there is like
2385.24 -> there's the API doesn't allow you to
2387.28 -> create this uh signal without initial
2389.26 -> value but there might be cases that
2391.599 -> there is no good default value right I
2394.96 -> mean if I really need to pull some uh
2397.48 -> information from the server that maybe
2399.04 -> like I cannot guess I like probably in
2402.04 -> the in in terms of price that might be
2403.78 -> zero might be a good default value but
2405.82 -> also undefined might be a good uh
2408.16 -> default value so obviously you've got
2409.78 -> full uh control in terms of type that's
2412.66 -> a signal holds it can be as small as you
2415.119 -> know like one counter here number or it
2417.64 -> can be Json from the server or it can be
2419.44 -> decent from the server or undefined so I
2422.26 -> would say create a signal with undefined
2423.7 -> when the information comes back from the
2425.5 -> server you set the information that
2427.42 -> you've got
2428.32 -> okay chaos Monster says what you need to
2430.96 -> do signal components bottom to top or
2433.72 -> can you just intermediate nodes in the
2436.42 -> tree yeah it's per component so you can
2439 -> mix and match that's that like we kind
2441.16 -> of recognize that in big applications
2442.599 -> you've got many components like you use
2444.7 -> third-party libraries we would not like
2447.579 -> like to force oh hey this is the entire
2450.099 -> subtree that you need to take care of so
2451.78 -> it's very component
2453.52 -> okay excellent are you considering
2456.099 -> signal plus custom change methods this
2459.579 -> is from uh I guess Mike F Pearson had an
2461.859 -> idea like this and Dimitri wanted to
2463.18 -> bring it to the top uh what do you what
2465.76 -> do you think about this bubble right
2467.14 -> right so so essentially I'd like the way
2469.78 -> we think about signals is this box for
2472.66 -> the value right like I can create it
2474.339 -> with the initial value and when I change
2476.8 -> the value it notifies dependencies that
2479.26 -> like hey you know maybe you should
2480.4 -> recompute uh now the the mutation or the
2483.76 -> the change method so write methods that
2486.339 -> we kind of came up with uh is just like
2488.859 -> said update and rotated with that we saw
2490.839 -> in the API I think it is an interesting
2493.06 -> idea to have like more specialized
2495.46 -> signals that people like you know maybe
2497.079 -> I I just I've got like a specific set of
2499.599 -> changes that that make sense right like
2501.64 -> maybe I can only provide numbers from
2503.68 -> some range so I I cannot accept certain
2507.64 -> things or maybe you know the change is
2509.44 -> very complicated as the operation so I
2511.24 -> don't want to give people complete
2512.8 -> Freedom how they can change so I think
2514.839 -> we'll be looking into it like uh how
2517.42 -> people can create their own more
2519.94 -> specialized version of signals or maybe
2522.099 -> this will end up in the realm of State
2524.38 -> Management libraries where you you've
2527.02 -> got like more specialization methods so
2528.94 -> it is an interesting idea and I think we
2531.46 -> will need it uh in part no concrete
2533.619 -> plans for now
2535.42 -> okay great uh here's a comment
2539.02 -> and the comment is kind of a question
2541.18 -> but maybe just a few sentences about
2542.98 -> this so this person wants to know kind
2545.32 -> of says well can we get rid of Joan Zone
2547.839 -> JS through signals
2549.7 -> right so so that's one of the biggest uh
2553.359 -> driving forces for us right like because
2555.7 -> zombie has given us this very broad
2558.22 -> notification behinds like something
2559.78 -> might have changed in the applications
2561.22 -> with signals we get the notification
2563.859 -> mechanics that is very very precise we
2566.079 -> know that something changed we know that
2568.119 -> some component is reading this value so
2571.359 -> we know that something changed and we
2573.16 -> know that who is interested in the
2575.2 -> change uh so we essentially can both
2578.859 -> replace Zone GS but also use this more
2581.44 -> precise information to our advantage
2584.74 -> okay sounds good all right let's do one
2587.44 -> more question and first remember if we
2589.18 -> don't get to your question through this
2590.2 -> segment we have a big q a at the end so
2593.02 -> you're gonna we're gonna do as best we
2594.88 -> can let's see oh this is a really great
2597.099 -> question if signals going to be in the
2600.16 -> angular core or is it going to be like a
2602.2 -> first party Library
2603.94 -> right so like many questions in the
2606.28 -> prayer of C was like why did you uh go
2608.98 -> with your own signal Library
2610.3 -> implementation instead of taking
2611.56 -> something off the shelves uh like more
2613.66 -> bags or that you don't preact uh did
2616.48 -> excellent uh job on their single library
2618.76 -> and what you very quickly notice when
2621.4 -> you try to integrate those things in the
2622.839 -> framework is this integration is very
2624.579 -> very tight
2626.26 -> um so it's uh like taking something
2629.339 -> third party would need a lot of
2631.72 -> massaging
2633.579 -> um the other thing is that those signal
2637 -> libraries they are popular but they are
2639.64 -> still very new in the sense that we are
2642.16 -> still figuring out the exact timing when
2644.14 -> the FX sub run should compute it to be
2646.24 -> lazy or eager and each library is making
2649.9 -> slightly different decisions we are
2652.18 -> still discovering algorithms so I see it
2654.76 -> as the good things right directors are
2656.44 -> relatively small like it's maybe less
2658.54 -> it's probably less than thousand lines
2660.099 -> of code so I see it as the good thing
2662.44 -> that people like try to write it
2665.079 -> something on discover new patterns new
2667.18 -> algorithms and title integrated in the
2669.28 -> frame
2670.42 -> okay we're going to get more from Pavel
2673.119 -> at the end with the Q a so hang tight
2675.819 -> but up next we have Jeremy L Bourne the
2679 -> Fantastic co-host of the gaming Stream
2681.099 -> So you folks know and love Jeremy Jeremy
2683.68 -> over to you
2685.599 -> hello
2689.04 -> that does that now it's fun Mark why
2691.42 -> don't you stay in here and hang out with
2692.56 -> me while I do this all right
2695.079 -> because I feel like as I go through this
2696.76 -> there's maybe some opportunities that
2698.859 -> are like well
2700.66 -> uh we can stop and ask questions as we
2703.18 -> go and maybe maybe even you have some
2705.28 -> questions I like when we have more of a
2707.079 -> conversation
2708.16 -> sounds good I'm here for it all right so
2711.18 -> this is a fun part of the RFC this is
2716.68 -> trying to give you a feel of what it is
2719.38 -> like to write a signal based component
2722.8 -> or use signals inside of your components
2725.2 -> and so we have a lot of proposed apis
2728.26 -> here
2729.46 -> and I want to say up front this is
2733.359 -> absolutely a proposal
2735.579 -> this is nothing that has been decided
2737.619 -> yet nothing that's been implemented yet
2739.24 -> the whole point of this RFC is to get
2741.52 -> all of your feedback on this and we are
2744.28 -> listening very carefully to that
2745.96 -> feedback and expect to absolutely change
2749.2 -> some parts of this based on what we hear
2752.26 -> from everyone so
2753.819 -> with that let's go ahead and dive in so
2757.14 -> in a signal-based world uh you will have
2761.079 -> signal-based components and these are
2765.099 -> slightly different from the components
2768.099 -> that you have today you will Mark
2769.42 -> signal-based components as signals true
2772.119 -> and we know that this is a little bit
2775.359 -> boilerplaty we have a note here uh
2777.76 -> especially if you're having like signals
2779.2 -> true Standalone true yeah like we don't
2781.78 -> love it either and we're still trying to
2783.099 -> think about ways to make it more concise
2784.839 -> so you don't have to write that all over
2786.52 -> the place but for now this is just kind
2788.619 -> of our like proof of concept of working
2790.3 -> that thing so don't worry about that too
2792.28 -> much
2793.48 -> using a signal inside of a component
2795.46 -> you've already seen Pavel talk through
2798.22 -> the signal apis themselves and so you're
2801.22 -> just using those apis inside of the
2804.7 -> component so you create a signal as one
2808.48 -> of your class members here and then you
2810.22 -> can just read it in your template and
2812.98 -> you can update them inside of you know
2815.14 -> event handlers whatever else you're
2816.7 -> doing and all of this will just you know
2819.339 -> stay up to date as you expect in angular
2821.38 -> and this signal updating here this is
2824.74 -> the thing that's driving change
2826.3 -> detection for this component's view
2828.7 -> right here
2830.5 -> so you may have a couple of questions
2832.78 -> right if you've been using angular for a
2834.46 -> while you see like hey you know we're
2835.9 -> calling a function and a template here
2837.22 -> people have told me over the years that
2839.2 -> I'm not supposed to call functions and
2840.88 -> templates
2841.78 -> well that doesn't really apply here
2843.4 -> right so the the whole notion of calling
2846.76 -> function and templates being slow is
2849.099 -> because when angular was doing change
2850.839 -> detection with zones
2853.06 -> and would rerun that function over and
2855.339 -> over and over and over again and
2857.68 -> recompute the expression in order to see
2860.8 -> if it was different from before and if
2862.54 -> the Dom needed to be updated
2864.28 -> that doesn't really apply anymore here
2866.02 -> right what we're doing with this
2867.88 -> function call is we're just reading that
2870.28 -> signal value which in and of itself is
2872.56 -> very cheap it's just really like
2874.24 -> returning a property that's inside of
2876.46 -> that signal
2877.599 -> and
2879.24 -> the signal updates here are the thing
2882.64 -> that is actually driving those updates
2884.859 -> and so this isn't something that you
2886.72 -> have to worry about when calling signal
2888.76 -> Getters here
2890.26 -> and you might also be wondering hey like
2893.38 -> I'm calling this getter in the template
2896.14 -> could angular just automatically do that
2898.9 -> for me like view does something similar
2901.06 -> to this where it will automatically read
2904.18 -> the dot value property of proxies the
2907.9 -> proxies they use for their reactivity
2910.24 -> system and view
2911.56 -> and the answer to this is no and there's
2914.68 -> a couple of reasons for that one is that
2918.16 -> we want to leave the door open for
2921.22 -> components to be able to bind actual
2924.04 -> signals themselves instead of reading
2926.44 -> the values out of a signal and you can
2929.2 -> even have situations where you have a
2930.94 -> signal of a signal which I know sounds
2933.04 -> kind of silly but can be really useful
2935.68 -> if you want to pass around
2938.38 -> um more sophisticated things
2940.96 -> and uh the angular framework angular
2945.94 -> compiler turns your templates into
2948.28 -> JavaScript code at compile time however
2950.92 -> the tracking mechanism for signals
2952.839 -> operates entirely at run time and so if
2956.5 -> you had some situation like this then
2960.04 -> you
2961.66 -> um
2964.38 -> you uh hold on I'm getting some chats uh
2967.78 -> could you zoom in just a bit I think the
2970.42 -> stream says I can't see it just as
2973.619 -> maybe my
2975.88 -> um
2976.839 -> as a window got it
2979.24 -> yeah
2981.599 -> that's better all right I think oh wait
2984.76 -> no if the streets want more more
2988.48 -> oh boy yeah they want more because the
2991.78 -> window a little bigger
2993.4 -> all right that looks good that's 200.
2998.26 -> HTTP okay yes 200 we're good uh so you
3003.9 -> might have a situation like this right
3005.52 -> where you're having a binding is like
3007.2 -> some object some method that you're
3008.88 -> calling some property and then deep
3011.04 -> inside of some method here there's like
3013.02 -> a signal read somewhere in the middle at
3015.48 -> compile time angular would have no way
3018.359 -> of introspecting on this very deeply and
3021.72 -> figuring out that this is a signal read
3024.839 -> and thus like doing any sort of
3026.7 -> automatic unwrapping right there's too
3028.859 -> much uh opacity for the framework to
3031.56 -> really dive into unless we were to in
3034.74 -> some other way restrict what you could
3037.26 -> bind to in your templates and we we
3040.319 -> don't want to do that Jeremy let me jump
3042.119 -> in real quick in that example where some
3044.04 -> method is can you just explain for the
3046.44 -> stream can you what that this dot items
3048.859 -> parentheses bracket just explain that
3051.24 -> that line of code in Signal language for
3053.099 -> us oh yeah this is just some contrived
3055.44 -> example I made up where you have a
3057.96 -> signal that has an array of strings and
3061.619 -> then you have some method that is
3063.599 -> returning uh so we're getting that array
3066.18 -> the current value of that array we're
3067.859 -> getting the first element and then we're
3069.78 -> calling two uppercase on it
3072.78 -> so it just you know some silly example I
3075.18 -> made up to show that you could have a
3077.94 -> signal read buried very deeply inside of
3081.66 -> some expression that would be really
3084.359 -> difficult or impossible to know about at
3086.88 -> compile time
3090.48 -> so here is another thing that we're
3093.059 -> interested in getting feedback on that
3095.64 -> is potentially confusing about using
3098.46 -> signals and components
3100.079 -> so you've seen we have uh signal reads
3103.079 -> inside of template Expressions here so
3105.3 -> you have count but you can also still
3107.64 -> have regular property uh in your regular
3111.54 -> properties in your template expression
3113.04 -> so here we see count is a signal and
3115.26 -> name it's just a regular old string and
3117.359 -> we can bind both of those in our
3120 -> template
3121.2 -> the thing is if you're used to writing
3123.9 -> angular today right you know that in
3126.54 -> zone based angular anytime you change
3128.339 -> this name
3129.599 -> then your template is going to update
3131.28 -> it's just that's what zone does it's
3133.38 -> it's just overzealous with how often it
3135.96 -> checks everything and so it's going to
3137.76 -> catch anytime you change this and update
3139.859 -> your template
3141.119 -> but in a signal-based component the only
3143.94 -> thing that's driving whether or not this
3145.98 -> component is going to be updated
3148.38 -> is whether or not a signal is written
3150.72 -> and so in this situation
3153.42 -> if you were to change count here with
3157.68 -> like an update method and you say you
3159.66 -> are also to change
3161.94 -> um this name here
3164.099 -> both of them would update in your
3166.319 -> template but if you only changed name it
3169.14 -> would not update
3171.72 -> and you might expect right like this the
3174.66 -> reason I even think this can be
3176.22 -> confusing is that in a signal-based
3178.319 -> component you might think that the only
3179.819 -> Expressions that are only ever going to
3181.68 -> change are expressions that change due
3183.9 -> to Signal reads and you know the reason
3186.839 -> for this is because
3188.579 -> we are using signals here as a mechanism
3191.64 -> to drive that this view is being checked
3194.579 -> but the bindings themselves still work
3196.68 -> the same way that they've always worked
3198.599 -> in angular which is that when the
3201 -> template is checked we update all of the
3203.28 -> dynamic Expressions based on their
3204.78 -> current value so
3207.3 -> um there are some things that we are
3208.98 -> considering to help mitigate this right
3211.26 -> like we can raise an error at runtime if
3213.78 -> a template expression changes without
3215.4 -> depending on a signal read which would
3217.26 -> basically uh make this an error
3219.54 -> condition here
3220.98 -> um we could use something like the
3222.359 -> language service to raise a compile time
3224.7 -> or a really a developer time warning if
3228.72 -> you um try to bind to something like
3230.7 -> this that's not marked as read-only
3233.339 -> um but that is
3235.86 -> [Music]
3236.28 -> um
3237.059 -> but that is uh limited obviously because
3240.119 -> if your read-only property is buried
3242.22 -> very deeply inside of something you
3243.72 -> would be able to detect that
3245.579 -> um so I see a question here is will you
3247.559 -> be able to force change detection to
3249.059 -> that name will be updated I don't have
3251.76 -> an answer for that yet we haven't gotten
3254.04 -> very deep into what like forcing change
3257.339 -> detection would be like however I will
3259.02 -> say that would very much not be aligned
3261.839 -> with the intent the design intent behind
3264.599 -> signals here right if you are going to
3267.119 -> change name you should put it in a
3269.04 -> signal that's what they're for is for
3271.559 -> having modeling your state that can
3273.3 -> change over time you would only really
3275.76 -> want to have a non-signal value like
3278.64 -> this if you know for a fact that it's
3281.22 -> not going to change
3282.46 -> [Music]
3285.059 -> cool so moving on uh computer properties
3289.559 -> Pablo talked about these they are pretty
3292.74 -> simple simple you define a computed you
3294.72 -> use it in your template uh with a little
3296.76 -> getter call and it just works uh the
3299.64 -> computed will only be reevaluated when
3301.68 -> any of the signals it reads have changed
3303.96 -> and so I won't spend a lot of time on
3305.94 -> that um although I will say
3308.04 -> there are a lot of usages of the NG on
3312.119 -> init and NG on changes life cycle
3313.74 -> methods today that will just go away
3316.2 -> with computed because
3318.119 -> there are tons of situations where
3320.64 -> you would say an engine on init or NGO
3323.64 -> changes read some inputs and then do
3326.52 -> some computation on those values and
3329.22 -> cache them into another property so you
3331.14 -> can use that property in your template
3332.819 -> without calling a function that's going
3334.38 -> to reevaluate in your template every
3336 -> time and so those situations you would
3338.88 -> just replace those with computers
3340.74 -> so that you are kind of declaring this
3343.68 -> uh more like declarative computation
3346.38 -> that you can reference directly in your
3347.76 -> template and the framework takes care of
3349.8 -> like only updating it when it needs to
3351.599 -> be updated
3354.48 -> so here we get to the big part of
3356.64 -> signal-based components and this is
3358.2 -> really in my mind at least the biggest
3361.44 -> thing about what makes a signal-based
3363.66 -> component signal based is that its
3365.64 -> inputs are signal based
3367.92 -> so
3369.72 -> we are when we say input we're talking
3372.119 -> about what today would be you you'd use
3374.16 -> the at input decorator
3376.559 -> um so this is an API that is in
3379.859 -> single-based components replacing the
3381.96 -> input decorator so I will also clarify
3385.2 -> um everything we're talking about here
3386.339 -> only applies to signal-based components
3388.859 -> that's it signal is true existing
3390.78 -> components Zone based components stay
3392.46 -> exactly the same nothing changes about
3394.5 -> those and there's no plan to get rid of
3397.559 -> those or deprecate them or anything like
3399.9 -> that like this is a purely purely new
3402.18 -> addition to angular
3404.72 -> so you can define an input by calling
3408.3 -> this input function here you can specify
3410.52 -> the type with the generic here and so in
3413.339 -> this case you would end up with a signal
3414.96 -> of like string or undefined since you're
3417.18 -> not passing a default value or you can
3419.579 -> pass a default value in which case you
3421.8 -> would just get a signal of string
3423.78 -> and you can also pass a config object as
3427.5 -> the second argument here
3430.26 -> um where this config object has things
3433.92 -> like Alias which is what you can pass to
3436.079 -> the input decorator today you could pass
3437.7 -> required true which is something that is
3439.8 -> landing in V16 is having the ability to
3442.44 -> have required inputs and so on
3445.099 -> and
3446.64 -> a couple of like
3448.38 -> Keynotes about this one is that
3452.22 -> um
3452.819 -> there's no decorators obviously here so
3455.339 -> we're going to talk about decorators
3456.48 -> towards the end of this section or since
3459 -> it applies to a couple of other apis as
3460.68 -> well
3461.4 -> another mission mention is that this
3463.5 -> input function is actually it has
3465.3 -> special meaning to angular and isn't
3467.76 -> just a regular function which we'll also
3471.24 -> talk about at the end in more detail and
3474.119 -> the signals you're getting from these
3476.64 -> inputs are read only they do not have
3480 -> methods for set update and mutate as you
3483.48 -> saw and the reason for this is because
3488 -> the Val we we think that this is kind of
3492 -> the right way for inputs to behave and
3495 -> this means that your input value is
3497.52 -> always going to represent the thing that
3499.079 -> is currently bound into that component
3502.92 -> and
3504.78 -> if it is writable then that state is
3507.839 -> only really reflecting Whoever has
3509.28 -> written into it most recently
3511.98 -> and so you would lose access to the
3514.02 -> thing that is currently being bound in
3515.94 -> so Jeremy does would this potential
3518.22 -> change bring us more in line with the
3520.26 -> concept of other framework so we have
3521.579 -> like the props where props are immutable
3523.619 -> read-only and then you don't do anything
3526.319 -> like that so input is honestly just
3528.839 -> angular's work for prop right like those
3531.9 -> two concepts are exactly the same thing
3534.059 -> is like this is a uh you can even kind
3537.42 -> of think of it as like a parameter or
3539.22 -> like this is an expected value for this
3541.74 -> component
3543 -> um honestly we've even discussed
3544.38 -> renaming inputs to props but that that
3546.78 -> might be just a little bit too much
3550.619 -> so
3552.96 -> um but yeah so in react and in view just
3556.38 -> as examples
3557.94 -> um their props are read-only and this is
3561 -> uh moving in that same direction for for
3563.28 -> inputs here
3565.38 -> so that said we are also introducing a
3571.2 -> brand new thing again this is all part
3573.96 -> of a proposal but uh introducing a brand
3576 -> new thing called Model inputs this is a
3580.5 -> new type of input so it's still an input
3582.54 -> but there's a different type of input
3585.799 -> and model actually creates a writable
3590.76 -> signal for you it gives you a writable
3592.92 -> signal
3593.88 -> um and so here in this example
3596.819 -> you can define a model we'll call it
3598.799 -> checked and we can bind that into our
3601.799 -> template here like whether or not it's
3603.299 -> checked then we have this toggle method
3605.22 -> that Updates this checked and just
3607.38 -> toggles it between true and false
3610.5 -> and we have the component here so this
3613.319 -> is we'll call some checkbox up here and
3614.94 -> so down here we have some page
3617.099 -> that is binding to this checked property
3619.799 -> but it is using a two-way binding
3623.16 -> and it is passing not
3626.339 -> um a raw value so we have this is admin
3628.859 -> signal here is passing not that is
3631.02 -> admins raw value but it's passing the
3633.96 -> actual signal itself
3636.24 -> and so what model gives you is a way of
3639.839 -> creating an input that supports two-way
3642.24 -> binding and with this two-way binding
3644.94 -> syntax by virtue of passing the signal
3646.799 -> is that the component is expressly
3651.059 -> participating in this contract to say
3653.339 -> that this two-way binding is occurring
3657.299 -> so when I use this two-way binding
3659.94 -> syntax and pass my signal I'm saying as
3662.46 -> this like some page component here like
3664.38 -> I know I'm participating in two-way
3666.78 -> binding and that this component is going
3668.88 -> to write into this signal
3671.099 -> and now uh this checkbox can update its
3675.119 -> own State and that will propagate back
3676.799 -> up to the page that is binding into it
3682.14 -> um and
3684.02 -> let's see uh you can also use one-way
3686.579 -> bindings with uh model inputs and that
3690.119 -> actually just makes them work the same
3691.619 -> way that angular inputs work today so
3696.839 -> um here if we use a one-way binding on
3699.599 -> this checked property that we had
3701.579 -> earlier and we look at is admin here
3705.359 -> um this checked is always just going to
3707.46 -> reflect whatever was written into it
3709.14 -> most recently so whether that is coming
3713.64 -> from this some page component or if it's
3715.74 -> coming from this checkbox here
3718.619 -> and again works the same way angular
3720.599 -> does today so this is probably a good
3722.339 -> stop it's a good spot to stop and ask
3725.16 -> four questions
3727.559 -> lots of questions lots of comments I
3729.839 -> mean we're probably going to have we
3731.28 -> have 30 queued questions so it's going
3733.68 -> to be a big q a but
3736.2 -> right so this is align what you're
3738.359 -> talking about we just uh put in 16
3741.44 -> next.4 support for required inputs
3745.319 -> will signal inputs be required by
3747.96 -> default if they do not have a default
3749.94 -> value
3752.04 -> um so no they will not be required by
3754.859 -> default required will still be uh inputs
3757.92 -> will still be optional by default and if
3759.54 -> you don't specify a default value what
3761.64 -> that means is that the type includes
3763.44 -> undefined by default
3767.88 -> sounds good
3769.579 -> it works the same way as inputs do today
3772.319 -> how does that model input tie in with
3774.299 -> the control value accessor so model
3777 -> inputs are completely and entirely
3779.94 -> unrelated to forms right so
3783.54 -> we we know that today NG model as a
3787.38 -> directive
3788.46 -> lives in the forms package and is like
3791.78 -> strictly associated with using angular
3794.46 -> forms that is not related to this new
3798.54 -> concept of model inputs at all
3801.42 -> okay what's up Starving Musician shout
3804.059 -> out to you good to see you again uh
3805.619 -> signal will be available as input
3809.22 -> um in on changes this is coming later
3812.22 -> we're we're gonna we're gonna get to
3813.839 -> life cycle later in this uh section
3816.839 -> all right okay so let's do this Jeremy
3818.94 -> let's have you continue because we still
3820.619 -> have one more section to go with Dylan
3823.14 -> more than one section again no no no in
3825.54 -> fact one more segment sorry yeah okay
3827.04 -> gotcha gotcha okay where where we're
3828.78 -> blessing all right we already talked
3829.98 -> about inputs being read only
3832.319 -> um input configuration this is getting a
3834.48 -> little bit in the nitty-gritty
3836.52 -> um but there's some API open questions
3838.2 -> here about send default values uh for or
3842.28 -> initial values for inputs
3845.24 -> and I will recommend that people go
3848.4 -> check out the RFC to to read about this
3850.26 -> part because I don't want to run that
3851.819 -> whole too deep on it right now
3853.98 -> uh so we're gonna go through a couple of
3855.54 -> quick sections now so I think it's worth
3857.819 -> the talk about why no decorator because
3859.319 -> there were quite a few questions
3863.22 -> so we're going to talk about why no
3864.54 -> decorators at the end
3866.099 -> um
3866.94 -> so angular queries uh that you might be
3870.42 -> familiar with today include view child
3871.68 -> contact child view children content
3873 -> children these work for the most part
3876.059 -> exactly the same way in signal-based
3877.859 -> components
3879.299 -> um but instead of The Decorator again we
3881.4 -> have this more function style API and
3885.319 -> instead of getting either for the
3888.9 -> singular like so view child is the
3891.299 -> singular instead of that just giving you
3893.4 -> the raw value you get a signal of that
3896.819 -> the thing you're querying for and
3898.44 -> similarly for the plural queries like
3901.26 -> new children you get a signal of an
3904.2 -> array of those results and this is again
3907.859 -> like we're talking about signal-based
3909.18 -> components it makes sense for queries to
3910.98 -> also give you signals because the result
3913.2 -> of a query is something that can change
3914.88 -> over time and so that signal value can
3917.819 -> participate in the rest of the signal
3919.319 -> reactivity system with the framework
3921.96 -> this does mean that the query list API
3925.319 -> is just not something that you have to
3927.839 -> deal with in signal-based components
3931.38 -> um
3932.4 -> but it also makes it much easier to deal
3935.16 -> with changes to these singular queries
3937.92 -> over time so like today you don't have
3940.92 -> like the query list does give you an
3942.54 -> observable of changes so you can react
3944.7 -> to changes over time but the singular
3946.2 -> versions don't
3947.46 -> um and so the signal just kind of is
3949.079 -> more consistent here
3951.54 -> so uh that then we'll move on to outputs
3954.359 -> again
3956.46 -> um the API is changing slightly here
3959.52 -> but outputs aren't actually affected by
3961.799 -> signals at all right so
3964.5 -> the reason we're even making any change
3967.26 -> at all here is because we just want to
3969.18 -> keep the API symmetry between inputs and
3972.059 -> outputs and so rather than saying you
3974.339 -> know at output equals new event emitter
3977.339 -> um there's there's more concise API that
3979.2 -> is just something like saved equals
3981 -> output of and then you know whatever
3982.98 -> type you're using or whatever config
3986.819 -> settings you want to set on your output
3989.039 -> and this works exactly the same way as
3991.74 -> outputs work today like this output
3993.66 -> function is just creating an animator
3995.76 -> there is nothing changed this this is
3998.099 -> not creating a signal this is not
4000.7 -> changing how outputs work in any way
4003.16 -> it's just a different API to be more
4006.14 -> consistent with inputs
4009.559 -> life cycle so this is the kind of last
4011.539 -> big part of this section
4013.88 -> so today angular has eight different
4017.78 -> life cycle methods that hook into
4020.42 -> different stages of angular's change
4022.7 -> detection
4023.96 -> it's and off the top of my head see if I
4026 -> can remember there's on a knit NG on
4028.64 -> changes do check after viewing it after
4030.92 -> content in it uh after content checked
4033.619 -> after view checked and on Destroy
4036.76 -> and these methods are very tightly
4041.299 -> coupled to the way change detection
4043.339 -> Works in angular today and as we've
4045.619 -> already talked about signal based
4046.819 -> components change detection works very
4049.22 -> differently for them and so it doesn't
4052.16 -> make sense to have the same lifecycle
4055.16 -> points as zone-based components inside
4058.28 -> of signal-based components and so with
4059.96 -> that we're proposing here a new set of
4063.799 -> life cycles
4065.599 -> that you can use in your components and
4068.42 -> so these are
4071.18 -> um all kind of just listed here
4073.46 -> um in the Constructor of this although
4075.619 -> some of these like don't have to go in a
4078.02 -> Constructor this is just kind of a way
4079.94 -> to like show them all together
4081.619 -> so
4082.76 -> starting from the top we've got after a
4085.099 -> knit this works roughly the same way as
4088.4 -> NG on a knit today is that this will run
4091.7 -> once all of your components inputs have
4095.839 -> their initial values
4099.199 -> um and I'm actually going to just go to
4101.719 -> the bottom there's also before destroy
4103.64 -> uh this works identically to NG on
4105.98 -> destroy it will run before the component
4108.08 -> is destroyed so you can do any like
4109.58 -> cleanup or deallocate anything things
4111.739 -> like that
4113.839 -> um we have effect here which is included
4116.779 -> in this lifecycle section because there
4118.58 -> is kind of a life cycle scheduling
4120.319 -> aspect to it but as Pablo already talked
4122.42 -> about in the signal section this is a
4125.359 -> way you can perform some sort of
4127.279 -> imperative action based on signals
4129.56 -> changing so for example here you know
4132.319 -> this effect we are saying like
4133.819 -> console.log this DOT first name when you
4136.1 -> run this effect this will be scheduled
4137.42 -> to run once and then in the future it
4139.52 -> will run anytime this first name changes
4141.98 -> hey Jeremy quick question about effect
4143.48 -> because we saw it isolated in examples
4146.239 -> do we need to always Define our effects
4149.54 -> in the Constructor no not effects
4154.54 -> in the Constructor in this example just
4156.92 -> because I wanted to put all of these
4158.48 -> right next to each other is there a good
4161.239 -> place to Define your effect when you're
4162.739 -> writing your code
4164.839 -> we will probably develop some best
4166.699 -> practices about this but we don't have
4169.04 -> anything formalized yet
4172.64 -> um but probably not uh don't ever render
4175.04 -> an effect or register an effect inside
4176.719 -> of another effect probably not something
4178.46 -> what you want to do
4182.6 -> um
4183.4 -> that you want yeah right
4188.6 -> so then we have a couple of uh really
4191.719 -> like all of these next three are kind of
4193.88 -> just like three different flavors of the
4195.56 -> same idea
4196.94 -> so we have after render
4199.34 -> and you don't actually have anything
4201.199 -> that lets you do this in angular today
4203.84 -> um people will use something like after
4205.94 -> view init for this but it's actually not
4208.699 -> really what you want it doesn't mean the
4210.44 -> same thing
4211.58 -> um so after render will run after the
4214.4 -> Dom of all components has been fully
4216.62 -> rendered and I I want to emphasize that
4218.48 -> all components so not just this
4219.92 -> component but all components right when
4222.02 -> like rendering has completed and this is
4226.1 -> for when you just absolutely need to do
4228.679 -> something with the render Dom so an
4231.44 -> example here is maybe you need to focus
4233 -> something in your Dom this is when you
4235.76 -> could do that or you want to uh do you
4239.12 -> know get bounding client wrecked because
4240.739 -> you need to measure something inside of
4242.719 -> your Dom for some reason this is where
4245.179 -> you would do that and then these next
4247.699 -> two are just kind of alternate flavors
4249.62 -> of this so we have after next render
4251.8 -> which is the same as after render except
4254.239 -> it only happens once and so again like
4256.88 -> you could you could call after next
4258.5 -> render anywhere right you could like
4260.3 -> call it in a click Handler or something
4262.34 -> like that and just say okay like
4264.14 -> whenever the next render happens I want
4265.76 -> to like run this code and like only run
4268.1 -> once so you can uh touch your Dom and
4271.46 -> similarly we have after render effect so
4274.52 -> this again will run after render
4276.92 -> but it will be using the same concept as
4280.04 -> effect so that you know you will run
4282.679 -> this and it will schedule this effect to
4285.8 -> run after render once and then for
4288.38 -> subsequent renderings it will only run
4291.14 -> if the tracked signal here changes
4296.6 -> um but these are all um these are all
4298.88 -> giving you a way to if you need to touch
4301.159 -> the Dom after rendering after angular
4303.26 -> has finished rendering you have a way of
4305.12 -> doing that
4306.38 -> um but all of them again are only they
4309.14 -> are they're running after everything has
4310.94 -> finished rendering not just this
4312.739 -> component
4316.04 -> um hey Jeremy before we move on I see a
4318.199 -> lot of feedback about these changes in
4321.5 -> general yeah right can you comment on
4324.739 -> the idea that we're still figuring out
4326.719 -> this or like at least tell lets people
4328.52 -> know what phase we're in yeah in terms
4330.62 -> of implementing changes like this yeah
4332.659 -> so we are in the phase where we think
4335.42 -> this is the direction we want to go and
4338.179 -> we have some reasons for why and we're
4340.34 -> interested in getting feedback about
4342.199 -> this direction so I've talked about like
4344.9 -> you know I've explained what we have
4346.4 -> here but let me talk a little bit more
4348.08 -> about why why are we doing it this way
4350.9 -> because
4352.699 -> the thing that's probably in your mind
4354.32 -> is like I don't like that right it's I
4356.9 -> don't like that these are in the
4357.679 -> Constructor like why why is my
4359.12 -> Constructor so complicated why do I have
4360.56 -> to put all that in there
4362.12 -> um so first of all you don't yeah you
4364.34 -> don't have to put all the Constructor so
4366.32 -> um the effect the after next render
4369.08 -> after render effect doesn't need to go
4370.88 -> on your contractor uh they're just
4372.5 -> hearing this example for like having
4374.84 -> them all in one place so
4376.58 -> that's one part of it
4379.46 -> the afternoon and after destroy and
4382.4 -> after render those are something that in
4385.76 -> this proposal would go in your
4387.62 -> Constructor
4388.76 -> and so um you're you're you may be
4391.58 -> wondering like the most obvious thing
4392.78 -> like why aren't these not methods like
4394.46 -> we have today
4396.14 -> um why are they like not just class
4397.88 -> members and so we have
4400.88 -> um a couple of reasons for that I will
4402.44 -> scroll down here this whole section why
4404.239 -> not class methods so uh first is that
4407.54 -> class methods can only be implemented
4409.219 -> once so with these you can actually have
4412.52 -> like multiple blocks of like you know
4414.679 -> afternoon Detroit if you wanted to
4417.08 -> um for for different purposes although I
4419 -> will like fully acknowledge right like
4420.62 -> there's it's not a big deal to have like
4422.659 -> your engine or NG on Destroy and call
4424.52 -> out two other functions in there
4427.04 -> uh so that is not a um huge argument but
4433.28 -> the second one is really more of a
4436.1 -> forward-looking thing for us is that
4437.719 -> class methods are tied to classes as an
4441.56 -> offering format
4443.659 -> so
4445.04 -> this is a kind of a an interesting spot
4447.739 -> we find ourselves in because
4451.239 -> uh
4452.96 -> we want to introduce signals in the
4455.48 -> signal apis and the signal-based
4458 -> reactivity to angular and we're trying
4460.76 -> to be very judicious about how much of
4462.92 -> angular we change at once and this is
4466.64 -> kind of striking the balance that we
4468.26 -> think is the least awkward
4470.659 -> of moving over to these new life cycle
4473.659 -> Hooks and
4475.94 -> using this new API style that is more
4479.36 -> aligned with where we think we might be
4481.1 -> going in the future
4483.32 -> um but at the same time we are not
4485.179 -> really ready to make large changes to
4488.48 -> angular's authoring format and so
4491.84 -> what we have is an approach that we
4494.6 -> think is best aligned with the where we
4497.3 -> think we'll be going in the future but
4499.94 -> we're not going there yet
4502.88 -> now that is not to say like this is this
4505.46 -> is kind of uh
4507.62 -> uh you know hinting at where we're going
4509.84 -> in the future but I do want to emphasize
4511.82 -> like we have no plans of getting rid of
4513.98 -> classes in anywhere right like they like
4516.26 -> similar to how we talked about like
4517.699 -> zone-based change detection
4520.4 -> um
4521.179 -> is sticking around for the foreseeable
4523.28 -> future we have no plans to get rid of it
4524.6 -> no plans to decorate it same thing for
4526.34 -> classes we have no plans to get rid of
4527.84 -> them no plans to deprecate them they are
4529.88 -> going to be a continued uh I think that
4533 -> is continued to support and if you like
4534.62 -> classes you keep your classes you keep
4536.179 -> using classes
4538.04 -> um
4538.699 -> and
4540.199 -> if we do go down a route of
4543.199 -> um evolving this into uh like alternate
4547.04 -> alternating formats for angular it will
4548.6 -> be a purely optional thing that will be
4550.46 -> additive to the framework
4553.52 -> so again this is all just proposals so
4556.159 -> we're we're interested in getting your
4557.48 -> feedback nothing no code has been
4559.219 -> written uh nothing is implemented so uh
4562.52 -> we're looking forward to your feedback
4564.14 -> all right Jeremy I think we gotta jump
4566 -> to the rhjs section yeah and our friends
4569.54 -> can the rfcs are public friends so
4572.179 -> there's a lot a lot of feedback about
4574.58 -> what our plans are in the comments
4577.82 -> these are our ideas right now like
4580.1 -> Jeremy said these are our ideas uh but
4582.62 -> we love this feedback so leave your
4584.36 -> comments on RSC as well so we can track
4586.1 -> your feedback we can track your comments
4588.44 -> uh and then we'll have some more time to
4590.42 -> talk about this but I think
4592.76 -> um for this for the team to know at the
4595.34 -> end let's let's touch on what our plans
4597.199 -> are going to be for rxjs for classes
4600.02 -> Etc life cycle methods because I think
4601.76 -> there might be some conflation between
4603.46 -> signal-based components using a
4605.48 -> different pattern than non-signal based
4607.88 -> components and then what's going to
4609.56 -> happen next so we'll definitely be ready
4612.38 -> to talk about that
4614.3 -> um Jeremy we'll have you back in just a
4616.159 -> moment after our friend Dylan goes
4618.739 -> through the rxjs example everybody let's
4621.8 -> give Jeremy big shout out for all the
4623.42 -> work you did with this that was
4624.56 -> fantastic thank you for that uh Jeremy
4626.36 -> we'll see you in a sec
4628.28 -> all right Dylan over to you talking
4630.32 -> about observables and Signal
4632.48 -> interoperability
4634.159 -> hi Mark
4635.36 -> um and great to be here today uh so uh
4638.12 -> my name is Dylan Hunt and I'm here to
4639.62 -> tell you all about how observables are
4641.36 -> going to interoperate with
4643.04 -> um the new signals-based components
4645.62 -> so uh obviously a lot of angular apps
4648.32 -> today rely on rxjs to manage their state
4651.5 -> um and we want interoperating between
4653.6 -> observables and signals to be a great
4655.159 -> experience so we are proposing to
4657.38 -> introduce two new apis the from
4659.6 -> observable API and the from signal API
4661.699 -> and we're exporting both of these from a
4663.92 -> sub package inside of core called rxjs
4666.02 -> interop
4667.28 -> um
4668.36 -> and I'm going to go over each of these
4670.52 -> functions but sort of the overall goal
4672.44 -> is that um when you have rxjs existing
4676.34 -> rxjs logic in your application you can
4678.44 -> sort of easily plug it in to these um
4680.719 -> new signals API API points that we're
4684.8 -> exposing
4686.179 -> um so let's go ahead and start with from
4687.62 -> observable
4688.76 -> so from observable lets you convert and
4690.56 -> observable to a signal and here in this
4693.32 -> example we are calling from observable
4695.3 -> with an observable inside and we get out
4697.699 -> a signal of number and the first
4699.8 -> important thing to know about from
4702.32 -> is that
4704 -> um the
4705.739 -> uh
4707.199 -> so it looks like my uh my camera has
4710.179 -> gone out let me
4712.88 -> switch to my built-in line there we go
4715.88 -> um so the first important thing to know
4717.56 -> about from observable is that it manages
4719.3 -> the life cycle of the observable
4722.12 -> um in particular when you first call it
4724.76 -> it subscribes to the observable
4726.679 -> immediately and the reason that we do
4728.659 -> this is because subscribing to the
4730.76 -> observable might have side effects so
4732.739 -> for example the subscription might open
4734.3 -> a network connection and um we want to
4737 -> do that immediately
4738.8 -> um so that the side effects happen right
4740.36 -> at the time that you call from
4741.44 -> observable
4743.96 -> um we also automatically unsubscribe
4746.42 -> from the observable when it goes out of
4748.46 -> scope or the context in which it's
4749.78 -> created is destroyed
4751.34 -> um so if you call from observable inside
4753.5 -> of a component then the subscription
4755.239 -> automatically gets cleaned up when that
4757.159 -> component is destroyed
4759.32 -> uh the next topic to talk about is
4761.48 -> initial values so observables can be
4764.48 -> used to model either synchronous or
4766.04 -> asynchronous data and in the
4767.719 -> asynchronous case you might not actually
4769.34 -> have an initial value coming through
4770.78 -> your observable at the time you call
4772.219 -> from observable and there are a couple
4774.14 -> different ways that we might be able to
4775.219 -> handle this um here I have a little
4777.02 -> example that is uh sort of describing
4779.6 -> one case in which this might happen
4781.04 -> where I have an interval but the first
4783.38 -> value doesn't actually get emitted
4785.36 -> immediately we have to wait for that
4786.679 -> first value
4787.82 -> so one thing we might be able to do is
4790.4 -> to throw an error immediately when uh we
4795.02 -> call from observable so we'll check for
4797 -> that initial value and if it's not there
4798.5 -> we just throw an error the second
4800.42 -> possibility is to throw an error when
4801.92 -> you try to read it for the first time
4803.659 -> um so if there's no value inside then
4806.179 -> when you read it we say there's no value
4807.8 -> we'll throw an error and the third
4809.659 -> option is to use something like null or
4812.36 -> undefined so that would be like a
4813.98 -> default initial value and that's similar
4815.9 -> to how async pipe works today
4817.94 -> and we haven't decided on exactly which
4821.54 -> behavior we want yet but our proposal is
4824.239 -> to go with option number two here which
4826.159 -> is to wait until the first time you read
4827.78 -> it and then throw an error and the
4829.28 -> reason for that is that in the wild we
4830.96 -> think there are a lot of observables out
4832.58 -> there that the developers reasonably
4834.62 -> confident are going to emit a first
4835.94 -> value but are technically asynchronous
4838.46 -> so they might not have done it at the
4839.84 -> time you call from observable yet so I
4842.239 -> think that in practice this will be the
4843.86 -> most useful option but we're open to
4845.659 -> feedback on this
4847.52 -> um
4849.26 -> something else that observables can do
4851.12 -> that doesn't map exactly onto sort of
4854.54 -> the signals world is error and
4856.4 -> completion States so observables can
4859.64 -> error and can it can uh also Mark
4862.34 -> themselves complete and signals um don't
4865.52 -> have these kinds of uh these kinds of
4867.199 -> special values but when our proposal is
4870.26 -> that when you use from observable to get
4872.06 -> a signal and the underlying observable
4873.62 -> produces an error we can just throw it
4875.6 -> and then you can handle that error using
4877.58 -> a try catch block
4879.02 -> um exactly the way you might be
4880.52 -> accustomed to in other contexts
4883.04 -> so if you don't want to do this though
4885.26 -> um there are several other options you
4887.48 -> could handle it on the rxjs side here
4889.4 -> we're showing an example of how you can
4890.96 -> dot pipe and catch the error or you can
4893.78 -> derive a computed so here we're creating
4895.699 -> a computed that internally tries and
4898.34 -> catches this error and then returns a
4900.44 -> special value in the event than an error
4901.94 -> curves
4903.14 -> um so that's errors completion so
4906.14 -> signals don't actually have a concept of
4907.82 -> being complete but again
4910.64 -> um you can handle this on the rxjs side
4913.4 -> by introducing a pipe and here we have
4915.44 -> another signal that marks is complete um
4918.199 -> and we're open to sort of discussing
4920.239 -> this on the RFC
4921.739 -> um but we think our current thinking is
4923.719 -> that this concept of completion doesn't
4925.28 -> doesn't map well enough under the world
4927.14 -> of signals um to provide them any sort
4929.78 -> of special treatment
4931.94 -> so let's talk about the other side of
4933.44 -> this interop API from signal
4935.84 -> um so from signal takes an angular
4937.34 -> signal and it returns an observable
4939.44 -> um
4940.1 -> and the way that this works is that we
4942.5 -> create an effect
4944 -> um and every time the observable updates
4945.86 -> we set the signal
4947.54 -> so life cycle and cleanup this actually
4949.699 -> contrasts with from observable method
4952.1 -> from observable function we talked about
4953.719 -> above um whereas from observable does
4955.94 -> take over management of your life cycle
4958.64 -> from signal does not to manage the life
4960.62 -> cycle of the corresponding observable
4962 -> and there are a couple different reasons
4964.34 -> for that so the first one is that the
4966.98 -> signal you're getting in might not
4968.659 -> actually have its life cycle logically
4970.58 -> attached to the component
4972.62 -> um the signal could be coming from
4973.699 -> anywhere in your application
4976.699 -> um they're valid as long as anybody has
4978.02 -> a reference to them so we should not
4980.9 -> manage the life cycle
4982.46 -> uh and the the other factor is that the
4985.64 -> observable
4986.84 -> um
4987.44 -> could be used in other computations
4989.78 -> Elsewhere for example you could pass
4991.82 -> them into a switch map you could pass
4994.4 -> them into a service and persist it
4995.9 -> somewhere else and the last important
4998.54 -> factor is that I'm subscribing from an
5000.159 -> observable could have side effects so we
5001.96 -> want you to control when those run as
5004 -> with your other observables we don't
5005.44 -> want to do it for you so this is why if
5009.34 -> you create an observable using the from
5010.659 -> signal function we will not
5012.219 -> automatically manage its life cycle and
5013.96 -> this is in contrast to from observable
5017.62 -> so I mentioned a second ago that the way
5020.38 -> this actually works is create we create
5022.12 -> an effect
5023.38 -> um
5024.04 -> and uh that has certain consequences for
5028.6 -> how values get emitted
5031.06 -> um
5031.78 -> so the observable that comes out of from
5034.179 -> signal uses an effect to send its next
5036.58 -> value but because those effects are
5039.04 -> asynchronous all the observable
5040.96 -> emissions are async so even the first
5043.12 -> value comes out asynchronously
5045.88 -> um and this has some consequences so in
5048.52 -> this example here
5049.9 -> um I take a signal and I convert it to
5051.88 -> an observable and then I set the signal
5053.5 -> three times
5055 -> um
5055.719 -> but the observable that we're looking at
5057.82 -> only ever produces the value three and
5060.46 -> the reason for that is
5062.26 -> um these three calls to dot set are
5064.239 -> synchronous so they happen all in a row
5066.34 -> immediately and then the effect runs
5068.5 -> afterwards and the effect emits to this
5070.54 -> observable
5071.8 -> um after all three of these sets have
5073.78 -> been have been already run and only sees
5076.36 -> the last one so this highlights sort of
5078.82 -> an important distinction which is that
5080.32 -> signals are fundamentally not streams um
5083.44 -> if I set this signal three times in a
5085.42 -> row
5086.26 -> um
5086.92 -> this happens synchronously it is not a
5089.02 -> stream of values it's just a single
5090.82 -> value with a change notification and
5092.8 -> then the effect runs afterwards and
5094.12 -> emits this final value
5097.32 -> if you wanted to get that behavior
5100.12 -> um uh sorry if you wanted to get the
5102.64 -> first value synchronously you can do
5104.38 -> that on the rxjs side and we have a code
5106.06 -> snippet showing you how to do that here
5109.9 -> um
5110.56 -> every Observer creates a new effect
5113.14 -> um so if you wanted to share your
5116.739 -> effects between all The Observers again
5118.96 -> that is possible and we have a little
5121.239 -> code snippet here showing how you can
5122.679 -> use share replay
5124.239 -> um so uh here we have a buffer size of
5128.02 -> one because signals only emit one value
5130.6 -> um and we set ref count to true so that
5132.82 -> after all of the subscribers have
5134.26 -> unsubscribed we clean up the underlying
5135.94 -> effect so if you expect to have a lot of
5138.34 -> observers and you want to share the
5139.6 -> underlying effect that's possible using
5141.28 -> the share replay
5143.08 -> um we don't want to do this for you
5145 -> automatically for a couple reasons
5147.28 -> um so the first is um behaving
5150.159 -> consistently
5151.42 -> um we think it would be somewhat
5152.8 -> surprising
5154 -> um
5155.04 -> to uh to do this for you automatically
5158.26 -> um the second is code size so um if you
5161.02 -> want this it's fairly simple to to uh to
5163.78 -> provide as per the snippet we don't want
5165.52 -> to have to include this in the default
5166.6 -> implementation
5168.34 -> um and we think it's relatively low
5170.679 -> overhead so registering multiple effects
5172.84 -> should have a relatively minimal
5174.04 -> performance cost
5175.9 -> um
5176.86 -> okay and the the last thing I want to
5178.54 -> talk about is take until destroyed
5180.58 -> um so this is a relatively common
5182.739 -> pattern
5183.94 -> um
5185.26 -> and we're introducing a new rxjs
5187.6 -> operator called take until destroyed
5189.699 -> um and this sort of simplifies
5192.52 -> um trying to trying to do something like
5194.98 -> this where you can just use the built-in
5196.36 -> operator where here as in this example
5199.6 -> um I use http.get and then I pipe it to
5202.84 -> take into destroyed and will
5204.1 -> automatically clean up
5205.659 -> um as soon as the underlying observable
5208.719 -> is destroyed
5212.38 -> um okay so I think that's kind of
5213.88 -> everything I wanted to talk about
5215.8 -> um back to you mark
5220.179 -> Dylan
5221.739 -> that was so like you know you're in
5224.56 -> there so quick I was like oh wait wait
5225.82 -> wait wait all right friends now it's
5227.5 -> time for the moment you have been
5228.88 -> waiting for
5230.92 -> we'll do this q a so here's how this is
5233.02 -> gonna work you all have left
5235.36 -> almost 50 questions that we haven't
5238 -> gotten to these are all great questions
5240.42 -> so for the panel here's how I would love
5243.52 -> for you folks to do this because we have
5245.38 -> so many questions and we have to try to
5248.139 -> get through all of them try to condense
5249.82 -> your answers if you can and point people
5251.62 -> to places where we might have answered
5253.54 -> them for more detail if we can okay
5257.38 -> um yeah so I'm just going to start at
5258.88 -> the top and we're just going to go
5259.84 -> through it so friends at home if we did
5261.159 -> not get your question make sure you ask
5262.6 -> it and we're trying to keep track of all
5264.699 -> of the questions all right
5266.86 -> so first question is or comment should
5269.08 -> we expect some react like hooks or even
5271.3 -> function based components
5275.139 -> we saw the hook thing but we really have
5277.12 -> hooks right we have some new methods
5279.34 -> that work with signals so let's talk
5281.139 -> about the function based components
5282.639 -> should we expect that
5285.4 -> so what I'll say about this is like we
5288.04 -> we've said uh a handful of times and we
5290.38 -> hint at it in this RC that we're
5293.86 -> considering alternate altering formats
5297.04 -> in the future like there there are a
5299.38 -> couple different forms that that can
5300.88 -> take and we're not really committing to
5302.56 -> anything just yet because we don't know
5304.239 -> we genuinely don't know what that will
5306.34 -> look like yet
5307.78 -> um all of our attention is really
5309.28 -> focused on the the signal-based stuff
5311.739 -> but we are
5313.9 -> clearly looking at alternatives to the
5316.719 -> class-based authoring format but I do
5319.3 -> want to emphasize right that any such
5322.42 -> change would be purely additive and it
5326.44 -> would not replace or deprecate or get
5329.26 -> rid of classes as an option for angular
5337 -> okay well angular elements handle signal
5340.48 -> based components
5342.159 -> yeah I I think it's fair to say we
5344.679 -> haven't thought about angular elements
5346.48 -> really at all as part of this project
5348.52 -> yet
5349.84 -> um there there's a few areas still where
5352.239 -> we have a kind of our list of like other
5355.179 -> things to look into
5356.86 -> um so testing is a big part of that
5358.179 -> right we know we need to do kind of a
5360.1 -> bit of a Sprint on testing to figure out
5363.88 -> what the story looks like from there and
5365.26 -> I think angular elements is a similar
5366.639 -> thing where we need to like sit down and
5368.5 -> actually think through like okay how
5370.179 -> does this fit in how does that play out
5371.86 -> with the rest of the ecosystem so that's
5374.199 -> a little bit further down the line than
5376.719 -> where we are today
5378.699 -> yeah I will I'll just add to that the
5380.92 -> zones are one of the things that makes
5383.32 -> elements a little complicated right now
5385.9 -> so the idea of a zoneless element is
5388.42 -> actually fairly compelling
5390.58 -> um I think we can do some cool things
5392.38 -> there
5396.28 -> okay so how about this for Eunice says
5398.92 -> are you afraid of having to adapt
5401.199 -> testing when migrating components to
5404.08 -> signals so this is more about the
5405.159 -> migration of your components when you go
5407.679 -> from already Zone based change detection
5410.44 -> to Signal base is there some
5412.6 -> consideration for the testing story and
5414.82 -> and things we'll have to do there
5417.88 -> I mean yeah that's similar to what I was
5419.679 -> already saying is we basically have
5421.3 -> testing as like a giant to do in our
5423.94 -> like next steps project tracker and that
5428.08 -> is absolutely going to be an important
5429.76 -> part of like the next phase of this I I
5431.8 -> honestly anticipate we're going to do
5433.36 -> another RFC just for testing by itself
5436 -> before we get to anywhere near final
5438.639 -> with this
5440.199 -> as for migration I think that's kind of
5443.02 -> a similar story where we have some ideas
5444.94 -> today about what it looks like to take
5447.34 -> some existing code and move it to be
5449.8 -> based on signals but I think we need to
5451.84 -> again like sit down and go through kind
5453.639 -> of the more comprehensive like here's
5456.88 -> the like 40 different aspects of your
5459.46 -> code that might be impacted by signals
5461.8 -> and like how you might approach changing
5464.62 -> each of those over to uh B from like
5467.38 -> Zoom based to Signal based um like we
5469.9 -> intend to you know at the point of
5472.3 -> shipping anything have very
5474.04 -> comprehensive guides and hopefully some
5476.08 -> tooling to assist for anyone who chooses
5480.219 -> to move some existing code to be signal
5482.86 -> based all right and for clarification
5485.139 -> here evidently this was the answer to
5487.659 -> somebody else's question and not a
5489.639 -> question for us so but it turns out to
5492.52 -> be a good question anyway uh for us to
5494.56 -> get some clarifications
5497.86 -> all right next question check this one
5500.02 -> out can you set
5501.639 -> permanent update function to overwrite
5504.58 -> the setter
5506.82 -> I don't want to like overwrap I don't
5508.96 -> want to like steal all the Talking time
5510.639 -> but I think in this situation you would
5512.26 -> just create your own
5513.88 -> uh your own object around the signal
5516.219 -> right you could create your own like
5519.1 -> uh I don't know uh chaos Monster is like
5522.94 -> store or whatever and that has whatever
5524.8 -> methods and then inside of that that's
5526.42 -> just calling you know set or update or
5528.34 -> mutate yeah I I interpreted this
5530.86 -> question as like can I set like a
5533.139 -> computation function so that when I set
5534.88 -> the signal to X it actually takes the
5537.159 -> value of like some function of X
5540.219 -> um and I think in that case the answer
5542.98 -> is like use a computer that's exactly
5545.02 -> what a computer does is it's kind of a
5546.76 -> signal that does a computation in the
5549.76 -> background
5551.44 -> yeah I mean you could also just call a
5553.54 -> function in the setter right you can say
5555.46 -> set some function value you want
5565.179 -> yeah so well I mean that is obviously an
5569.32 -> option right for uh we type that there's
5571.9 -> a large discussion on uh RFC I think
5576.699 -> it's the option it sounds like a bit
5579.58 -> more
5581.5 -> um
5582.94 -> a bit more verbose right and less
5585.58 -> discoverable but hey you know like
5589.179 -> options are on the table Etc so if you
5592.48 -> didn't add your comment I think you did
5593.739 -> add the commentary FC already so we've
5595.48 -> got it on our later yeah
5597.76 -> for First full transparency we also
5599.92 -> considered an API like instead of mutate
5602.199 -> having something that was just like
5603.46 -> notify and we we kind of threw that out
5606.94 -> because we didn't want it to become the
5608.679 -> new like scope.digest
5614.56 -> all right this is a two-parter so I'm
5616.48 -> going to read both of them to you folks
5618.46 -> all right so if using a global signal
5621.1 -> variable if I used if I use it in two
5624.4 -> different components
5626.739 -> um like I like previously how I use
5628.36 -> Behavior subjects so I need to
5630.219 -> unsubscribe from the stream so should
5632.8 -> this also come in the picture while we
5634.719 -> use signals in multiple components
5636.219 -> because it looks like it's going to be a
5638.02 -> memory leak so you kind of get the idea
5639.639 -> here you get uh components okay yeah so
5642.58 -> let me get this out so obviously like
5644.32 -> you can like the the nice property of
5646.36 -> this whole signal system is that like a
5648.1 -> completely click to create them where
5649.719 -> you want like I mean we're showing
5651.88 -> examples where like either they were
5654.159 -> like free-flowing code or in the
5655.9 -> component code I don't think we had an
5658.12 -> example of like a service like the long
5660.219 -> story short you can create those
5661.36 -> examples wherever you want and you can
5663.04 -> read them whatever they you want the act
5666.699 -> of reading a signal value is kind of
5669.4 -> like a subscribing right like because we
5671.32 -> we track those dependencies
5672.46 -> automatically but the cool part here is
5674.5 -> like you don't have to explicitly
5675.94 -> unsubscribe so all the benefits no
5678.94 -> drawbacks that we are aware of
5681.48 -> Yeah in our in our signal Library when
5684.219 -> we were designing it one of the kind of
5686.02 -> core requirements was that we did not
5688.179 -> want you to have to do
5690.159 -> manual bookkeeping of where signals are
5692.86 -> used and destroy the signals when you're
5695.08 -> done with them
5696.58 -> um so signals don't have to be
5697.84 -> explicitly cleaned up you can create
5699.34 -> them you can throw them away when you're
5701.199 -> done with them
5702.82 -> um and as long as your templates are no
5704.44 -> longer reading them then those signals
5705.94 -> can just be garbage collected and
5707.199 -> disappear no memory leaks
5713.02 -> all right
5714.4 -> signals could be compatible with rhjs to
5717.1 -> get the boat The Best of Both Worlds but
5719.38 -> we've said that this is a path that
5721.719 -> we're on where we're creating an
5723.4 -> interrupt between rhjs and signals is
5725.8 -> that accurate is that a good way to
5727.179 -> describe that for our friends
5729.28 -> yeah so if you follow the the rxjs
5731.8 -> interop RFC discussion that's happening
5734.679 -> one of the key questions that's being
5736.9 -> talked about is like should signals
5739.719 -> implement the observable interface
5742.9 -> basically and interoperate with rxjs
5745.96 -> directly or should it be a more explicit
5747.699 -> action to say I would like to take the
5750.04 -> signal and get an observable
5752.44 -> um and I think our perspective is that
5754.06 -> we prefer it being in explicit action
5757.48 -> um that doesn't couple the signal
5759.159 -> library to rxjs and observable Concepts
5762.06 -> which keeps the interface much cleaner
5764.44 -> and it's
5766.12 -> there are some concerns around like the
5769 -> timing and how you would need an
5771.219 -> injection context to be able to use this
5773.199 -> interop Library
5775.239 -> um that I think don't fit very well with
5777.82 -> an implicit conversion that could be
5780.28 -> very surprising to people if you try to
5782.08 -> like use your signal in an observable
5784.179 -> and it fails because it's not in an
5786.639 -> injection context or something like that
5789.12 -> so this intentional I would like to you
5792.219 -> know subscribe here and convert thing a
5794.38 -> to thing B
5796.239 -> um I think is a much less air prone
5799.36 -> design
5801.34 -> sounds good all right another great
5803.739 -> question will you will we provide eslint
5806.679 -> rules to support the pureness of
5808.179 -> computers so this is the question I
5809.38 -> asked uh in our internal version of this
5811.54 -> was about how can we help people see
5813.159 -> that they really shouldn't be writing to
5814.84 -> signals in a computed Etc what can we do
5817.96 -> to support are we looking at eslint
5820.179 -> rules maybe the uh some other compile
5822.94 -> time checks so just walk us through it
5825.46 -> all right cool uh so obviously like well
5829.239 -> hey I think that the computers should be
5831.82 -> a pure function but like how it should
5833.56 -> be it's not the guarantee that they will
5835.239 -> be in practice uh so we do have a couple
5838.179 -> of texts in uh in place uh first like we
5841.179 -> do inside the Library detect all the
5842.98 -> rights to a signal from computed right
5844.96 -> like so if you were just like trying to
5846.699 -> uh
5848.08 -> you know sneakily right to the signal
5850.78 -> from a computer this will be an error uh
5853.3 -> we're thinking of um maybe also detected
5856.12 -> cases where people
5857.98 -> um they create other computed or effects
5861.04 -> from a computed which is a weird but
5862.78 -> like might happen either like by air or
5864.76 -> else maybe not intentionally but it
5866.56 -> might happen accidentally so that might
5869.26 -> be a tag uh then pureness I think it's
5873.94 -> absolute theirs is like very hard to
5875.92 -> detect in all the cases right like you
5878.679 -> you might have a as an example you might
5881.199 -> have variable read that behind the scene
5883.12 -> is a getter that will have some side
5885.699 -> effects so we will never be able to
5887.679 -> detect all the changes we might have
5890.32 -> some rules and and text in place but it
5892.42 -> will never be 100 guaranteed uh I hope
5896.02 -> still that we can cut the most common
5897.699 -> sources of problems
5901.01 -> [Music]
5902.62 -> all right let's go to this question also
5904.9 -> set slash updates treats objects as it
5907.42 -> rates as if they always change right and
5910 -> only runs equality for Primitives
5912.88 -> that's correct that's exactly the case
5914.679 -> and and again this is because we wanted
5917.02 -> to support
5919.239 -> um people that prefer to use mutable
5921.76 -> data right like if I if I prefer to just
5926.44 -> change the content of array and have
5928.12 -> this change propagated that's kind of
5930.28 -> from where the the default equality
5932.139 -> comes we we don't have it covered in in
5934.179 -> the RFC again it's a request for
5936.219 -> comments that was the current thinking
5938.32 -> you know
5942.46 -> all right so I know people myself and
5945.46 -> thought as Maori as always question
5947.56 -> nobody's no AKs monster you're asking
5949.54 -> great questions uh we actually uh talked
5951.46 -> about this but we are looking at ways to
5954.46 -> help developers and experience to
5956.08 -> provide Tools around to avoid things
5958.36 -> like loops with effects right so what
5960.58 -> are ideas here just in general it's a
5962.44 -> little bit more on that one yeah so I
5964.36 -> think like we talked about computers but
5966.46 -> similarly it computers we did introduce
5968.739 -> a check in effect that we are not
5970.96 -> writing to signals which is uh I guess
5974.44 -> the main source or potential source of
5977.739 -> loops
5979.659 -> um
5980.26 -> but
5982.06 -> again that's hopefully will eliminate
5985 -> the vast majority of situation where
5986.739 -> people get into trouble at least this is
5988.36 -> what we saw initially the people like oh
5990.1 -> I'm going to write to a signal from an
5992.5 -> effect that maybe this effect like reads
5994.78 -> this signal back or maybe for a computer
5996.34 -> and whatnot so hopefully this eliminates
5998.679 -> the the major food gun again like it's
6002.219 -> very hard to prevent all that uh we I
6005.639 -> don't think we've got ambition to
6006.9 -> prevent all the infinite looks in the
6008.639 -> world like rather I mean how I would
6010.679 -> know how to do this that that would be
6012.48 -> great but uh there will be proper
6014.34 -> situation
6015.42 -> but again the vast modality should be
6017.9 -> addressed by preventing rights losing
6021.06 -> two signals by the fire
6022.8 -> yeah I also think it's okay go ahead
6025.8 -> yeah I say I'm also keeping a running
6028.62 -> list that is I think at like 12 to 14
6031.08 -> items now like here are some
6034.139 -> anti-patterns that might emerge or
6036.9 -> practices we might want to discourage
6038.88 -> with signals and let's think about ways
6041.639 -> to try to
6042.719 -> not let developers fall into any of them
6046.86 -> yeah absolutely
6049.199 -> um what I wanted to add is that a fact
6052.26 -> is an API it looks really interesting
6054.48 -> and really tempting
6056.639 -> um because it is the point at which like
6058.38 -> oh I can do something when signals
6060.12 -> change and that's interesting
6062.699 -> um in reality I think most of the use
6066 -> cases and applications will not require
6068.219 -> effects
6070.26 -> um effects are kind of a specialized
6071.88 -> tool that you reach for when you
6074.46 -> absolutely need to do something kind of
6076.26 -> imperative outside of the normal flow of
6078.9 -> rendering
6080.4 -> um so it's a implementation tool for
6083.1 -> directives it's an implementation tool
6084.84 -> for some of the interrupt story that we
6086.52 -> have I think it'll be pretty rare that
6088.86 -> you end up reaching for this thing
6090.719 -> inside of a component
6092.48 -> more often than not you'll be using
6094.679 -> computeds or you'll be using some one of
6096.84 -> the other life cycle hooks
6099.179 -> um to kind of do things at the right
6101.639 -> time in your application
6105.06 -> all right so do you have an idea how new
6108 -> projects will be generated in the future
6110.219 -> well you just get a prompt uh for and
6113.159 -> the CLI to choose between starting a new
6115.199 -> project with zone or without Zone I have
6117.6 -> some ideas about this but I do want to
6118.98 -> hear from you folks first
6121.56 -> we haven't got that far yet
6124.26 -> so the reason why I did about this
6126.659 -> because
6127.619 -> um I'm writing something for you all to
6129.119 -> review because I've been thinking about
6130.98 -> this as I've been working on stuff so if
6133.32 -> you expect something not you folks at
6135.119 -> home but this panel to see something
6138.119 -> coming from me to review about ideas
6139.5 -> about this okay but we are thinking
6141.659 -> about it we just haven't gotten really
6143.04 -> far to the planning phase but we are
6144.54 -> thinking about this type of stuff as a
6147 -> team
6147.659 -> all right this is funny what I think the
6149.88 -> intention is is good uh will this create
6152.34 -> will effects create effect tell so I
6154.44 -> guess it's the pattern that you see in
6156.6 -> other Frameworks where you just kind of
6158.1 -> overdo it with your effects and then you
6160.679 -> can kind of create some anti-patterns
6162.179 -> what are we thinking about how we can
6164.219 -> support developers to avoid
6166.08 -> anti-patterns with effects and some of
6167.82 -> the new things we've announced
6170.699 -> well we'll have to publish Attorneys at
6173.34 -> least ship it to to everyone no more
6176.82 -> seriously I think like this is a new
6179.4 -> system and we will we are kind of
6181.56 -> collectively discovering and learning it
6183.9 -> and as the more applications have been
6185.82 -> created I am sure that best practices
6187.739 -> will will emerge but what I would like
6190.619 -> to say for this initial learning process
6192.54 -> is just like uh remember that FX exists
6195.9 -> but try to use it as light as possible
6197.88 -> like uh really the signals are great at
6200.52 -> uh deriving state from another state
6203.94 -> right like computed should be a main
6206.4 -> tool in Your Arsenal
6208.679 -> um so every time you you feel like
6210.3 -> reaching out for effect uh and
6213.179 -> especially when you think like oh I need
6214.739 -> the fact and I need to try to sleep now
6216.36 -> just like some some lights that should
6219.06 -> start blinking it's like oh you know
6220.32 -> maybe I should like reach for other
6222.6 -> tools
6224.219 -> um but but I I guess it's a collective
6226.199 -> learning uh that starts now
6229.8 -> all right how this is a really really
6231.54 -> important one um our backwards
6233.219 -> compatibility story is legendary in the
6235.26 -> industry because we really try to add
6237.48 -> things and bring along everyone else so
6239.76 -> how long uh we'll compare the back
6242.1 -> compatibility be maintained how much
6244.5 -> time do we have before we before we have
6246.179 -> to refactor current apps and libraries
6247.98 -> yeah so so I'll say like we have no
6252.179 -> plans to again like deprecate remove or
6256.32 -> otherwise like get rid of uh the like
6259.86 -> Zone based components just like they
6262.5 -> they will stick around for as long as
6264.239 -> into the future we can predict
6267.119 -> um right like I I won't necessarily say
6269.58 -> forever because forever is a long time
6271.679 -> and we don't know what will happen in
6273.78 -> you know five years ten years but
6276.48 -> uh we fully intend for those to stick
6279.9 -> around and keep working
6283.32 -> all right I think we kind of touched on
6284.94 -> this but we can just do a couple of
6286.56 -> sentences here can you use methods and
6289.26 -> computed and will it still attract
6290.88 -> signal changes red inside that method
6294.54 -> right yeah they exactly like you can us
6297.48 -> like the only thing that matters is they
6300.119 -> read of a signal in the same JavaScript
6302.94 -> Factory like so if like if you've got
6305.94 -> the chain of calls uh the the signal
6309.06 -> will find it's kind of computed to
6311.4 -> register itself also dependency so the
6314.04 -> the short answer is a absolutely
6317.1 -> okay good so this align writes to
6320.52 -> signals and effects just in the same
6323.159 -> tick Isom I'm not sure what this
6324.659 -> question means but well I mean it's in
6327.119 -> the same JavaScript stuck frame
6331.139 -> so like it's you know like that like you
6333.659 -> you effectively like put itself on a on
6335.82 -> a stack and start executing your effect
6339.06 -> function and if during execution of this
6341.28 -> function you try to write the signal but
6343.619 -> uh if you if you start some asynchronous
6345.48 -> processing obviously you you are free to
6347.94 -> write to signals
6350.52 -> okay well the previous effect cleanup
6352.619 -> run when it runs next time I think in
6355.199 -> the RFC it says cleanup runs only on
6358.32 -> component Destroyer it is it's both
6361.02 -> actually right like so uh if you don't
6363.239 -> destroy an effect the cleanup function
6365.58 -> will run just before uh Next Step so
6368.88 -> again this is this idea of like if
6370.92 -> there's any work to stop that was
6372.78 -> started by the previous effect run
6374.82 -> that's your chance of cleaning up right
6376.92 -> like so this is this part of before the
6379.32 -> next time and then obviously if someone
6381.06 -> says like oh hey effect I don't need you
6382.679 -> anymore then what we also want to do
6385.32 -> stop the current work in progress and
6387 -> this is where we do cleanup so so in
6389.4 -> both cases it will
6392.58 -> okay great
6394.739 -> all right this is Gray from Akshay says
6397.5 -> let's say my angular app is large scale
6400.199 -> if we decide to create new components
6402.239 -> using signals however the old components
6404.88 -> will still be Zone based as a Dev what
6407.699 -> would be my advantages of starting that
6409.92 -> new signal component
6414 -> it's a good question
6417.679 -> one that I think Alex are probably yeah
6421.52 -> I've had different list of things but go
6423.9 -> go ahead yeah no I can take a stab at it
6426.6 -> um
6427.44 -> today in angular especially for for
6429.42 -> large scale applications we see a lot of
6432.119 -> people reaching for on push change
6433.98 -> detection as a tool to kind of manage
6436.8 -> the work that change detection is doing
6438.42 -> and communicate a little bit better with
6440.34 -> the framework that you know only
6442.8 -> specific components need to be updated
6444.48 -> in response to specific model changes
6447.96 -> um
6448.739 -> signals I would argue are a
6452.58 -> like more ergonomic solution to this
6454.92 -> problem
6456.179 -> um they don't have some of the like
6459 -> sharp edges of on push
6460.86 -> particularly around on how on push kind
6463.38 -> of shields children from chain detection
6465.239 -> even if those children may not have
6467.4 -> opted into the on push model
6469.4 -> as well as you know marking a component
6472.32 -> for check and on push marks all of its
6474.3 -> parents all the way up the Zone tree to
6476.76 -> the root of the application because
6478.02 -> change detection has to reach that
6479.639 -> component in order to check it that is
6481.8 -> not true of signal components
6484.199 -> um so if you change a signal that
6485.76 -> affects a signal component in a Zone
6487.44 -> application that signal component can
6489.84 -> change attacked even if no other
6491.58 -> component in the application is marked
6493.8 -> for check
6496.38 -> all right this is a question for Jeremy
6498.84 -> specifically can we have for one second
6500.699 -> appreciate Jeremy's adorable dog in the
6503.94 -> background yes we can it is adorable
6506.46 -> that your pup is just chilling out yes
6508.199 -> that's Mal and if you'd like to see more
6510.179 -> of him you can go to the website
6511.86 -> mal.dogmail.gov
6517.02 -> in the chat except I'm Shadow banned for
6520.139 -> some reason I'm gonna fix it I'm going
6522.54 -> to fix it at some point oh wait let's
6525.719 -> let's keep all these questions uh will
6527.76 -> we be able to have signals and async
6530.1 -> streams in the same template
6534.48 -> in all those components absolutely
6538.139 -> um in Signal components this is an open
6540 -> question for us whether that whether we
6542.46 -> can make the async pipe still work
6545.52 -> um there are some questions about the
6547.139 -> change detector ref and how that will
6548.76 -> interact with the signal change
6550.02 -> detection that we need to figure out but
6553.02 -> you can always use the from observable
6554.639 -> operator to convert your async stream to
6556.8 -> a signal
6558.48 -> um and then read it anywhere you like in
6560.219 -> the template
6562.26 -> well HTTP client method return a signal
6566.58 -> they will not
6568.98 -> um HTTP client is a great example of an
6572.219 -> actual stream of events
6574.679 -> um this is something where you're being
6575.88 -> notified at a point in time that
6577.619 -> something has happened right this
6578.88 -> response has come back from the server
6581.58 -> um signals really are values that change
6585.06 -> over time
6586.26 -> so it doesn't make the sense to ask the
6588.239 -> question like what is the value of the
6589.92 -> HTTP response before the response gets
6592.26 -> back
6593.88 -> um so
6595.56 -> so I don't know what what HTTP client
6597.96 -> will do in the future
6600.48 -> um whether we want to explore you know
6603.3 -> some kind of fetch based integration
6604.86 -> with it or whether the current like xhr
6607.139 -> backend Will Survive
6608.699 -> but it will not return signals
6614.159 -> okay do we have any stats available
6616.8 -> about some change when we switch from
6619.5 -> signals or from zones to signals in
6622.98 -> terms of performance
6625.679 -> not at this point right like we we see
6628.92 -> like how much change detection neurons
6631.32 -> and big applications and like
6633.179 -> like the anecdote I spend like a lot of
6635.34 -> time profiling uh in in scope of other
6637.8 -> work but like it's not uncommon to see
6639.659 -> applications that run change detection
6641.159 -> thousand times uh and I I know some
6644.639 -> public and well-known applications that
6646.8 -> do this so it is not uh you know
6649.32 -> anecdotical oh maybe it does change it
6651.119 -> actually is expensive it actually you
6652.5 -> can see it on the profiler very very
6654 -> clearly
6655.739 -> all right friends we have a little bit
6657.36 -> of a dilemma we have 28 more questions
6660.36 -> and only 10 more minutes scheduled for
6662.219 -> the Stream So I want to ask you to keep
6665.159 -> your your responses as quick as possible
6668.46 -> within reason we'll do what we can we do
6670.199 -> want to get people there there as I've
6671.94 -> been waiting for uh we previously told
6673.679 -> that we can make signals and jump and
6675.42 -> Zone GS in the component itself I only
6678 -> see a Boolean switch between signals in
6680.04 -> zone JS how can we achieve them both in
6682.199 -> the same component yes you can use
6684.659 -> signals inside of zone-based components
6687.78 -> but you don't get the signal based
6691.199 -> component apis right so like the signal
6694.38 -> based component apis like input model
6696.9 -> things like that those are like on on
6700.08 -> off but the concept of like signal
6702.179 -> computed and effect you can use anywhere
6704.04 -> even outside of components
6707.4 -> all right so do we have a plan for
6709.26 -> template variable syntax that will solve
6711.78 -> for the absence of type correction when
6714.119 -> calling signals in a template
6717.54 -> uh I don't think there's one plan I
6719.76 -> think there are many ideas
6722.159 -> um so template type checking is entirely
6725.76 -> under the angular compiler's direction
6727.94 -> we could make it so that signal reads
6730.98 -> are type coerced properly that's
6733.139 -> something we're looking at doing
6734.6 -> obviously the trade-off there is that
6737.04 -> they would behave slightly differently
6738.84 -> than
6739.92 -> um can you know control flow in the
6741.6 -> actual component code
6742.98 -> another option here is to introduce some
6745.56 -> kind of like template variable syntax
6747.78 -> which is a feature request for other
6749.46 -> reasons that's something we you know
6751.199 -> would be open to talking about doing
6754.56 -> um but yeah we're exploring kind of
6756 -> multiple Avenues to solve this problem
6758.159 -> and again this is an RFC maybe the the
6760.619 -> result of the discussion is that we do
6762.78 -> actually want dot value for this reason
6766.139 -> okay our computed properties preferred
6768.119 -> over pipes
6769.32 -> I think pure pipes are like the the
6772.08 -> computers are not so much nicer
6773.639 -> experience as compared to Pure pipes in
6775.56 -> terms of creation and how they behave
6777.42 -> that I would say yes
6782.1 -> is there any reason why input couldn't
6785.1 -> support rxjs as well as signals or any
6788.82 -> of the other existing means of passing
6791.46 -> inputs
6795.36 -> it's a it's a complicated answer
6799.92 -> uh that has a lot of there's a lot of
6802.139 -> reasons for why like so obviously we've
6805.199 -> had a GitHub issue for a long time it's
6807.36 -> like I want observable inputs and what
6811.02 -> we have is not that right signals is not
6813.36 -> observable inputs it is imp like it is
6816.48 -> signals as inputs and an API that if you
6819.78 -> want you can create an observable from
6821.52 -> that input which is
6823.38 -> our way of a kind of roundabout uh
6826.38 -> solving that but also solving a lot of
6828 -> other problems at the same time and
6829.679 -> because we're short on time I don't
6830.88 -> think we can get into all of the reasons
6832.32 -> for them but that is kind of the we we
6835.86 -> intend the rxjs interop story there to
6838.98 -> be that the answer for this
6844.08 -> all right so let's say let's keep going
6846.6 -> here does the current setup lean more to
6849.619 -> passing down signals between components
6852.6 -> or each layer of components creating
6854.4 -> their own version of signal and using
6856.86 -> these inputs
6858.84 -> I bet there is no leaning here like you
6861.3 -> are free to as I said like you are free
6863.52 -> to create your signals where you believe
6865.5 -> the source of data is so like some
6867.9 -> signal needs to be shared between
6869.04 -> components put it in a service or
6870.719 -> whatever else if it's a local state to
6873.3 -> component put it in the component and
6875.159 -> just like use signals in template as you
6878.159 -> would do and we will take care of the
6880.8 -> propagation of change to the components
6882.42 -> that are reading and are interesting in
6884.4 -> the change of the value
6887.94 -> how about this how will a component
6890.159 -> Factory know about a component's inputs
6892.679 -> and outputs if they are not declared via
6895.32 -> decorator
6897.48 -> our compiler doesn't actually like our
6901.26 -> angular decorators don't actually
6902.639 -> execute right our compiler looks for the
6905.46 -> presence of these things on fields and
6907.98 -> compiles the component based on the
6909.659 -> information that it extracts from the
6911.76 -> decorators we can extract the same
6913.98 -> information from seeing the input
6915.9 -> function on the right hand side of a
6917.4 -> property
6921.179 -> so is it possible to pass the signal
6924.36 -> function itself and the template instead
6927.119 -> of calling it this will allow the
6929.04 -> compiler to check if a binding is a
6930.96 -> signal an update just that binding
6933.48 -> instead of the component
6939.199 -> it's I think that so like function or
6943.139 -> the signal that you don't read is just
6944.699 -> like a reference to an object has any
6946.38 -> other JavaScript object there's really
6948.06 -> only one rule in this system like if you
6950.639 -> read a signal this is where we kind of
6952.98 -> connect the dots and say like all this
6954.54 -> component means refreshing that's the
6955.86 -> Only Rule if you keep passing it down
6957.54 -> like nothing happens
6961.679 -> okay uh the banana in the box so square
6965.52 -> bracket parentheses syntax with sugar
6967.38 -> for event emitter and inputs
6970.56 -> which was async I think so the behavior
6973.56 -> what the model will change
6975.38 -> yes the the idea behind model inputs is
6979.38 -> uh slightly different than the two-way
6981.84 -> binding
6983.34 -> concept we had before where it was just
6985.5 -> a de-suguring of a property binding and
6987.78 -> an event being emitted
6989.94 -> so that is slightly different the first
6992.34 -> draft of the RFC even had a question of
6995.46 -> like a discussion point about the API
6997.86 -> for this but we cut that out as not
6999.9 -> being the most germane to the like Core
7002.6 -> Concepts of signals
7006.98 -> well we have to form support signals
7011.5 -> we um definitely think that signals are
7014.42 -> going to impact forms um but to be
7017.119 -> honest we haven't really gotten
7019.1 -> um gotten yet to the point where we're
7020.78 -> deciding exactly how
7022.82 -> um so at the very least
7024.98 -> um we'll want to expose things like the
7026.3 -> value as signals
7027.98 -> or the validations data signals but we
7030.139 -> haven't decided exactly how
7032.54 -> excellent how about this this is a good
7034.639 -> question does that increase bundle size
7037.04 -> you know because we're keeping both
7038.599 -> patterns
7041.3 -> we'll see well
7043.54 -> the good news the good news is that uh
7047.599 -> the IV instructions are like by Design
7050.239 -> 360 cable so we've got this uh ability
7053.42 -> of a compiler it just outputs as the
7056.179 -> compilation results things that I use so
7058.58 -> probably we will be aggressively leaning
7061.099 -> on this mechanism but hey sometimes
7064.04 -> we might have some if else that will be
7066.32 -> not shakable we'll see we will we will
7068.96 -> keep uh an eye on it and definitely not
7071.78 -> trying to increase the size of the
7073.099 -> framework yeah what I can say is like
7075.44 -> we're always like very aware of the size
7077.659 -> and making you know judgment calls as we
7081.199 -> as we add things on whether or not it's
7083.42 -> worth it and where what we can cut out
7085.04 -> elsewhere
7087.679 -> all right so here's some honest feedback
7089.54 -> let classes be classes leverage the full
7092.599 -> power of classes keep class syntax
7095.9 -> classy yeah so this is content I'll
7099.56 -> repeat this again right like maybe I
7101.54 -> just can't say it enough classes aren't
7103.219 -> going away if you like castles you can
7104.84 -> keep using classes uh we have no plans
7107.96 -> to get rid of them and we know a lot of
7109.82 -> people choose angular because you do
7111.139 -> like them we also know a lot of people
7113.179 -> don't choose angular because they don't
7114.86 -> like them so do with that piece of
7117.32 -> information as you will
7119.659 -> yeah and just maybe to add to this like
7122.179 -> I think like we are going all classes
7123.92 -> versus practices like this is not binary
7125.78 -> choice that we have to have to do really
7127.76 -> what we are looking at like what's the
7129.32 -> best developer experience that we can
7130.88 -> create with with the pieces that we've
7133.52 -> got that with disposal in JavaScript
7135.02 -> syntax so there is no reality in here we
7137.36 -> are just like trying different things
7139.34 -> and trying to settle on something that
7141.38 -> works that we believe works the best for
7143.06 -> developers but since the LFC like it's
7145.699 -> great feedback to have
7148.099 -> okay uh we got a couple more questions
7150.739 -> and then we're gonna call it a day uh so
7153.199 -> I'm a huge fan of di dependency
7155.119 -> injection and ioc inversion of control
7157.36 -> huge proponent of SRP SOC Etc so angular
7160.76 -> implicitly supports all of these and it
7162.679 -> was fundamentally designed on all these
7164.739 -> long-standing sound principles are we
7167.599 -> moving away from Di and ioc
7170 -> we love the idea nothing about this
7173.42 -> changes Dil like the totally separate
7176 -> mechanism totally separate system on
7178.159 -> impacted by signals and in fact I will
7179.78 -> say I think signals actually works even
7182.119 -> better with di because uh the the signal
7186.619 -> based model we've come up with you can
7188.06 -> use it anywhere not just in components
7190.34 -> you can use signals in your you know
7192.44 -> injectable services and what have you
7194 -> and the reactivity model between all of
7196.94 -> your injectable things and your
7198.32 -> components and your directives all just
7199.76 -> integrates nicely through the whole
7201.92 -> system
7203.599 -> all right here's our last question from
7205.94 -> Alexi what is this going to be released
7211.76 -> did that depends on the feedback we get
7213.44 -> honestly
7214.659 -> but I think we can say
7217.699 -> what can we say about when people can
7219.5 -> try this do we have any information
7220.82 -> about that
7223.159 -> we can absolutely talk about V60
7225.98 -> yeah so in V16 there is a developer
7229.76 -> preview of The Signal primitive right so
7233.78 -> that is the signal computed in effect
7236.119 -> and there's a way where you can use
7238.28 -> those in angular and they are tied into
7242.179 -> angular's current change detection
7244.34 -> system which maybe Alex you could talk a
7246.44 -> little bit more about for the rest of it
7248.119 -> for like the signal-based components and
7252.26 -> um all of the like more like granular
7255.619 -> change detection that will be at a later
7257.659 -> date which we we won't commit to
7259.699 -> anything today
7261.86 -> yeah in V16
7264.26 -> um signals are in the framework you can
7266.599 -> use them they're under developer preview
7268 -> and if you read signals in on push
7271.28 -> components signals will Mark those on
7273.8 -> push components for check
7276.44 -> um so signals kind of integrate into the
7278.239 -> existing change detection story
7280.76 -> um in a way where you can use them to
7282.199 -> drive change detection in the same way
7283.639 -> that the async pipe drives change
7284.9 -> infection with observables and so you
7286.94 -> can kind of play around with the signal
7288.739 -> experience the rxjs interop layer is
7291.679 -> there so you can play around with
7292.88 -> converting signals to observables or
7294.679 -> vice versa
7296.199 -> and kind of use that to see a little bit
7299.48 -> what signal change detection will work
7301.04 -> like when we have actual signal
7303.679 -> components
7304.94 -> but developer preview things will change
7308.739 -> timings will change things will change
7311.42 -> we got to like make sure we're super
7312.679 -> clear about that there are still lots of
7314.48 -> things that we're deciding as a team is
7316.34 -> that correct like still lots of parts of
7318.739 -> this so this whole conversation was us
7320.78 -> just sharing with you what our thoughts
7322.04 -> are this is what we're thinking about
7323.179 -> doing next we're going your feedback is
7325.34 -> super valuable I think the team I think
7327.38 -> we're really grateful just to see
7328.4 -> everybody's feedback so thank you for
7329.659 -> that hey friends Dylan Pavel Jeremy Alex
7332.9 -> thanks for hanging out today and talking
7334.82 -> with the community this was fantastic
7336.32 -> yeah and thanks Mark for indulging us in
7339.08 -> our last minute and put together live
7341.54 -> stream no you folks are fantastic all
7344.36 -> right friends so at home uh this is a
7346.4 -> recorded live stream if we did not get
7347.78 -> to your questions add them to the RVC
7349.34 -> we're trying to reply we're reading at
7351.32 -> least and yeah so continue to be great
7354.199 -> and kind to each other and do us one big
7356.239 -> favor and go build great apps
Source: https://www.youtube.com/watch?v=oTFauGIs7s0