switch package:reflex

Create an Event that will occur whenever the currently-selected input Event occurs
Switches to the new event whenever it receives one. Only the old event is considered the moment a new one is switched in; the output event will fire at that moment only if the old event does. Because the simultaneous firing case is irrelevant, this function imposes laxer "timing requirements" on the overall circuit, avoiding many potential cyclic dependency / metastability failures. It's also more performant. Use this rather than switchHoldPromptly and switchHoldPromptOnly unless you are absolutely sure you need to act on the new event in the coincidental case.
switches to a new event whenever it receives one. At the moment of switching, the old event will be ignored if it fires, and the new one will be used if it fires; this is the opposite of switch, which will use only the old value. switchHold, by always forwarding the old event the moment it is switched out, avoids many potential cyclic dependency problems / metastability problems. It's also more performant. Use it instead unless you are sure you cannot.
Given a PatchTarget of events (e.g., a Map with Event values) and an event of Patches (e.g., a PatchMap with Event values), produce an Event of the PatchTarget type that fires with the patched value.
Switches to the new event whenever it receives one. Whenever a new event is provided, if it is firing, its value will be the resulting event's value; if it is not firing, but the old one is, the old one's value will be used. switchHold, by always forwarding the old event the moment it is switched out, avoids many potential cyclic dependency problems / metastability problems. It's also more performant. Use it instead unless you are sure you cannot.
Deprecated: Use switchHoldPromptOnly instead. The 'switchHold*' naming convention was chosen because those functions are more closely related to each other than they are to switch.
Deprecated: Use switchHoldPromptly instead. The 'switchHold*' naming convention was chosen because those functions are more closely related to each other than they are to switch.
Create a new behavior given a starting behavior and switch to the behavior carried by the event when it fires.
Switches to the new Event whenever it receives one. Only the old event is considered the moment a new one is switched in; the output event will fire at that moment if only if the old event does. Prefer this to switchPromptlyDyn where possible. The lack of doing double work when the outer and (new) inner fires means this imposes fewer "timing requirements" and thus is far more easy to use without introducing fresh failure cases. switchDyn is also more performant.
Switches to the new Event whenever it receives one. Switching occurs before the inner Event fires - so if the Dynamic changes and both the old and new inner Events fire simultaneously, the output will fire with the value of the new Event. Prefer switchDyn to this where possible. The timing requirements that switching before imposes are likely to bring down your app unless you are very careful. switchDyn is also more performant.