Describe the bug 🐞
While trying to upgrade to ReactiveUI 24, I ran into the issue that DynamicData doesn't seem to be updated yet to use the Primitives. This makes it impossible to upgrade to the Primitives it seems. Fine for now, since I can use the .Reactive packages right? Well... it mostly works, except that WhenActivated apparently already expects to provide a MultipleDisposables instance, while DisposeWith doesn't know what that is.
Step to reproduce
- Swap out ReactiveUI 23.x with ReactiveUI.Reative 24.x
- Import the ReactiveUI.Reactive namespace everywhere necessary
Error CS1503 : Argument 2: cannot convert from 'System.Action<System.IDisposable>' to 'System.Reactive.Disposables.CompositeDisposable'
The error references the other overload, which is also not compatible of course.
Reproduction
Something simple as this doesn't compile:
using System;
using System.Reactive.Disposables.Fluent;
using ReactiveUI.Reactive;
namespace Test;
public sealed class MyViewModel : ReactiveObject, IActivatableViewModel
{
public ViewModelActivator Activator { get; } = new();
private string _testProperty;
public string TestProperty {
get => _testProperty;
private set => this.RaiseAndSetIfChanged(ref _testProperty, value);
}
public MyViewModel()
{
this.WhenActivated(d => {
this.WhenAnyValue(vm => vm.TestProperty)
.Subscribe(_ => {})
.DisposeWith(d);
});
}
}
Expected behavior
I would expect to have a WhenActivated overload that supplies an old-fashioned CompositeDisposable.
Screenshots 🖼️
No response
IDE
Rider macOS
Operating system
No response
Version
No response
Device
No response
ReactiveUI Version
24.1.0
Additional information ℹ️
After upgrading I had to do some digging to find there is a ReactiveUI.Primitives repository that includes great documentation for migration. Would be nice to reference this existence from the ReactiveUI release notes! (Or did I miss something?)
Maybe also mention not to migrate yet if you're using DynamicData, which is a recommended dependency.
Describe the bug 🐞
While trying to upgrade to ReactiveUI 24, I ran into the issue that DynamicData doesn't seem to be updated yet to use the Primitives. This makes it impossible to upgrade to the Primitives it seems. Fine for now, since I can use the .Reactive packages right? Well... it mostly works, except that
WhenActivatedapparently already expects to provide aMultipleDisposablesinstance, whileDisposeWithdoesn't know what that is.Step to reproduce
Error CS1503 : Argument 2: cannot convert from 'System.Action<System.IDisposable>' to 'System.Reactive.Disposables.CompositeDisposable'The error references the other overload, which is also not compatible of course.
Reproduction
Something simple as this doesn't compile:
Expected behavior
I would expect to have a
WhenActivatedoverload that supplies an old-fashionedCompositeDisposable.Screenshots 🖼️
No response
IDE
Rider macOS
Operating system
No response
Version
No response
Device
No response
ReactiveUI Version
24.1.0
Additional information ℹ️
After upgrading I had to do some digging to find there is a
ReactiveUI.Primitivesrepository that includes great documentation for migration. Would be nice to reference this existence from the ReactiveUI release notes! (Or did I miss something?)Maybe also mention not to migrate yet if you're using DynamicData, which is a recommended dependency.