Skip to content

Releases: reactiveui/ReactiveUI

7.2.0

26 Feb 03:29
Compare
Choose a tag to compare

As part of this release we had 34 commits which resulted in 27 issues being closed.

All Platforms

  • #1282 feat: a more flexible default view locator
  • #1261 feat: allow interaction handlers of any observable type
  • #1255 feat: add scheduling support to interactions
  • #1283 fix: add UseInvariantCultureAttribute and apply to relevant tests
  • #1274 fix: ensure synchronous command execution is lazy. Note that this is a potentially breaking change if your existing usage of synchronous commands is incorrect. See the issue for details.
  • #1247 fix: catch exceptions from InvokeCommand
  • #1244 fix: complete command execution only when pipeline completes
  • #1235 fix: InvokeCommand targets ReactiveCommandBase, not ReactiveCommand
  • #1289 perf: use shared, static observables to reduce allocations
  • #1236 perf: remove superfluous AsObservable calls in ReactiveCommand
  • #1269 test: add activation tests
  • #1268 style: tidy up and expand comments in activation code

Xamarin Android

  • #1250 feat: more flexible WireUpControls implementation

Xamarin Forms

  • #1270 feat: synchronize ViewModel and BindingContext properties
  • #1281 fix: assign VM from correct thread in RoutedViewHost

Housekeeping

  • #1180 feat: enable unit test coverage/coveralls
  • #1267 style: tidy up comments for binding code
  • #1263 chore: failing to set the appveyor version should not be a fatal build error
  • #1257 chore: resolved gitlink wasn't working because pdbs/xml were not included because of a packaging defect
  • #1252 chore: rename MobileLifecycle.cs to SuspensionHost.cs
  • #1238 chore: removed next-version definition

Documentation

  • #1243 docs: delete docs folder
  • #1198 docs: document pull-request merging guidelines/process
  • #1197 docs: document release process for contributors

Where to get it

You can download this release from nuget.org

7.1.0

12 Jan 09:44
Compare
Choose a tag to compare

As part of this release we had 8 commits which resulted in 4 issues being closed.

All Platforms

  • #1225 fix: reactiveui NuGet packages should be pinned and only work with packages from the same release
  • #1218 fix: subscription leakage in ReactiveCommand

Xamarin Android

  • #1217 feature: allow WireUpControls to find View members

Xamarin iOS

  • #1216 feature: added generic reactive controllers and views for iOS and Mac

Xamarin Mac

  • #1216 feature: added generic reactive controllers and views for iOS and Mac

Where to get it

You can download this release from nuget.org

7.0.0

12 Nov 04:52
Compare
Choose a tag to compare

Oh, hai!

Wow! It's been a while, but we have a juicy new release for you. We had to take some time to heal internally, to train and mentor the future generations of maintainers which are going to carry us forward. Additionally the .NET ecosystem changed underneath us, and we didn't have continuous integration setup. Let this be a lesson to anyone considering operating an open-source project that targets nine platforms. Have a roadmap and succession plan in place and never allow long-running branches, ever. Implement continuous integration and mature your release processes to the point where cutting a new release is as simple as pressing a button.

So what is ReactiveUI?

ReactiveUI is inspired by functional reactive programming and is the father of the ReactiveCocoa (Cocoa/Swift) framework. Internally we debate whether we are or are not a framework, as at its core the project is essentially a bunch of extension methods for the Reactive Extensions.

ReactiveUI was started seven years ago and is now old enough to attend grade school but unlike a teenager is extremely stable. ReactiveUI has matured over the years into a solid and fine choice for building your next application. Additionally, because the implementation is unopinionated migration from another framework to ReactiveUI is incredibly easy.. You can slide it in on a single ViewModel and then migrate as you become more comfortable. Avoid those costly rewrites.

When reading the code, you'll find that ReactiveUI is rather unopinionated in the implementation, but we have always held some beliefs which have been the basis and foundation of the project.

We believe that code is communication between people, that also happens to run on a computer. If you optimise for humans, then over a long time your project will end up better. Software should be understandable by other people; that is super important.

We believe that only the power of the Reactive Extensions allows you to express the idea around a feature in one readable place.

Even Miguel de Icaza agrees

Think about your typical user interface? It's a mutable bag of sadness with code all over the place. Instead of telling a computer how to do its job, why not define what the computers job is and get out of its way? If that sounds odd, let us re-introduce you to Microsoft Excel.

Instead of doing the typical ViewModel isLoading = true/false mutable dance by toggling it on and off in different branches of your code. Why not express the condition in a single place using a Microsoft Excel expression - =SUM(A1: B2)?

Still not convinced?

Maybe you need to watch this insanely smart, and eccentric guy in a tie-dye t-shirt do maths on a whiteboard:

Async/await is the zombie plague. Liberate your codebase today.

ReactiveUI is used in production at GitHub, Slack, Microsoft and is supported by consultants from different companies from all around the world. It's used at our clients, we can't name names specifically, but we encourage our community to showcase where and how they have used ReactiveUI in their applications, some members have even gone as far as open-sourcing their app and sharing their entire codebase. You are of course under no obligation to share these insights (or code) with us but it is greatly appreciated by the project maintainers, and you'll usually get a retweet out of it.

Where are the examples?

We are working on it; this release was for us. Next release is for you. For now:

Rx is hard

No, it's not. Learning Rx is one of the best things you can do to improve yourself as a software engineer. Unit testing was hard, so was dependency injection at first. The principals you learn during your journey will forever change you and best of all the knowledge is implementation and language agnostic. We have designed ReactiveUI so you can slowly transition from an async/await codebase at a pace that feels comfortable to you.

Highlights

ReactiveCommand is Better

ReactiveCommand is completely rewritten again (sorry).

  • interfaces are gone. Any use of IReactiveCommand should be replaced with ReactiveCommand, possibly with type information (see below).
  • static creation methods have changed:
    • execution logic is always required when calling CreateXxx methods, including synchronous commands (i.e. those created with Create). So rather than calling Create and then subscribing, you call Create and pass in your execution logic right then and there.
    • for consistency, the execution logic is always provided as the first parameter. Other parameters (canExecute, scheduler) are optional.
    • CreateAsyncObservable is now called CreateFromObservable.
    • CreateAsyncTask is now called CreateFromTask.
  • parameter types are formalized by TParam in ReactiveCommand<TParam, TResult>.
    • if your command takes a parameter, you no longer take an object and cast it. Instead, you explicitly specify the parameter type when creating the command (of course, you can still choose object as your TParam if that makes sense, perhaps as an intermediary migration step).
  • ICommand is now implemented explicitly. As a result:
    • the Execute exposed by ReactiveCommand is reactive (it returns IObservable<TResult>). It is therefore lazy and won't do anything unless something subscribes to it.
    • CanExecuteObservable is now called CanExecute.
  • observables such as CanExecute and IsExecuting are now behavioral. That is, they will always provide the current value to new subscribers.
  • RoutingState has been updated to use the new implementation. Consequently, any use of its commands will be affected per the above.
  • the ToCommand extension method has been removed. This was a simple convenience to take an IObservable<bool> and use it as the canExecute pipeline for a new command. If you're using ToCommand, you can just replace it with a call to one of the creation methods on ReactiveCommand.

Old:

var canExecute = ...;
var someCommand = ReactiveCommand.Create(canExecute);
someCommand.Subscribe(x => /* execution logic */);

var someAsyncCommand1 = ReactiveCommand.CreateAsyncObservable(canExecute, someObservableMethod);
var someAsyncCommand2 = ReactiveCommand.CreateAsyncTask(canExecute, someTaskMethod);

someCommand.Execute();

New:

var canExecute = ...;
var someCommand = ReactiveCommand.Create(() => /* execution logic */);

var someAsyncCommand1 = ReactiveCommand.CreateFromObservable(someObservableMethod, canExecute);
var someAsyncCommand2 = ReactiveCommand.CreateFromTask(someTaskMethod, canExecute);

someCommand.Execute().Subscribe();

For more details, please see the extensive documentation on this topic.

Note To enable you to ease into the migration, all previous types are available under the ReactiveUI.Legacy namespace. Note, however, that there is no legacy version of RoutingState, so any code you have that interacts with its command may require minor updates.

Interactions are New and Exciting

UserError has been generalized and re-imagined. We call it interactions, and we think you'll like it. We did this in part because people were feeling icky using UserError for non-error scenarios. Basically, we realized that people need a general mechanism via which a view model can ask a question, and wait for the answer. It doesn't have to be an error - we're not that pessimistic! You could be asking to confirm a file deletion, or maybe how the weather is out there in the analog world.

Migrating from UserError to the interactions infrastructure is not really a case of one-for-one substitution. But here are some tips to get you started:

  • read through the documentation first.
  • decide whether you need shared interactions and, if so, define them in an appropriate place for your application (often just a static class).
  • for any non-shared interactions, have your view model create an instance of the interaction and expose it via a property.
  • typically you want the corresponding view to handle interactions by calling one of the RegisterHandler methods on the interaction exposed by the view model.
  • the view model can call Handle on the interaction, passing in an input value.
  • Recovery commands are no longer a built-in thing. If you need such a mechanism for your interactions, you are encouraged to write an appropriate class and use it as the input for your interaction.

Note To enable you to ease into the migration,...

Read more

6.5.2

04 Sep 07:15
Compare
Choose a tag to compare

This release resolves a NuGet metadata defect which was preventing the installation of ReactiveUI into Windows Phone projects (issue #1146). The assemblies within v6.5.2 are the same as those found in v6.5.1 and v6.5.0.

For new projects, we recommend joining us in Slack and using the v7 nightlies which are available from MyGet as we are in the final stages of preparing for the release of v7.0.0.

ReactiveUI 6.5.1

17 Aug 08:40
Compare
Choose a tag to compare

This release resolves a NuGet metadata defect which was preventing the installation of ReactiveUI into portable class libraries that targeted Profile259. The assemblies within v6.5.1 are the same as those found in v6.5.0.

For new projects, we recommend joining us in Slack and using the v7 nightlies which are available from MyGet as we are in the final stages of preparing for the release of v7.0.0.

ReactiveUI 6.5.0

11 May 03:22
Compare
Choose a tag to compare

What's New

Collection View improvements (#820)

Thanks to @kentcb, our support of UITableViewController and UICollectionViewController are much more reliable, and will correctly animate in items. A huge thanks for an awesome PR!

Dependency version bumps

This version of ReactiveUI requires Xamarin.Forms 1.4.2 and the latest Xamarin.Android AppCompat library. This most likely won't be a problem, but if it is you can downgrade to 6.4.x.

Bug fixes

  • Fix issue where WhenAnyObservable doesn't protect against null (#831, thanks @kentcb)
  • Improve WeakEventHandler when working with Xamarin.Forms, prevent crash (#826, thanks @nsainaney)
  • Allow null property name to be used with WhenAny (#811, thanks @asarium)
  • Improve binding error logging (#840, thanks @bradtwurst)
  • Add constructors to ReactiveActivity and ReactiveFragment to allow them to inherit a Java reference (#841, thanks @jonfuller)
  • Fix Xamarin.Forms navigation with ViewModel-first navigation (#819, thanks @bratsche)
  • Cleanup to activation on WP (#825, thanks @flagbug)

Oops Release for ReactiveUI 6.4.0

11 May 03:11
Compare
Choose a tag to compare
6.4.0.1

ReactiveUI 6.4.0.1

ReactiveUI 6.4.0

09 Feb 00:14
Compare
Choose a tag to compare

What's New

Xamarin.Mac 64-bit Support (#797)

Thanks to @mteper, ReactiveUI now has 64-bit Xamarin.Mac support

Other Stuff

ReactiveUI 6.3.1

13 Jan 04:53
Compare
Choose a tag to compare

What's New

Bug Fixes

  • Xamarin.Forms is now compatible with 64-bit iOS (#790)
  • Fix a crash in TestScheduler.WithAsync (#772, thanks @flagbug)
  • Add ReactiveNavigationController (#783, thanks @BrianSakhai)

ReactiveUI 6.3.0

03 Jan 21:38
Compare
Choose a tag to compare

What's New

  • Support for Xamarin.iOS 8.6 - you must build based on this for Xamarin.iOS
  • Add a Reactive FragmentActivity (#773, thanks @michaelstonis!)