github ReactiveX/RxSwift 2.0-alpha.1
NS

latest releases: 6.7.1, 6.7.0, 6.6.0...
pre-release8 years ago

This is a alpha version of RxSwift 2.0.

New version of the language helped us to improve a lot of things and this is a short summary of changes.

  • Removes deprecated APIs
  • Adds ObservableType
  • Moved from using >- operator to protocol extensions .
  • Adds support for Swift 2.0 error handling try/do/catch

You can now just write

    API.fetchData(URL)
      .map { rawData in
          if invalidData(rawData) {
              throw myParsingError
          }

          ...

          return parsedData
      }
  • RxCocoa introduces bindTo extensions
    combineLatest(firstName.rx_text, lastName.rx_text) { $0 + " " + $1 }
            .map { "Greeting \($0)" }
            .bindTo(greetingLabel.rx_text)

... works for UITableView/UICollectionView too

viewModel.rows
            .bindTo(resultsTableView.rx_itemsWithCellIdentifier("WikipediaSearchCell")) { (_, viewModel, cell: WikipediaSearchCell) in
                cell.viewModel = viewModel
            }
            .addDisposableTo(disposeBag)
  • Adds new operators (array version of zip, array version of combineLatest, ...)
  • Renames catch to catchError
  • Change from disposeBag.addDisposable to disposable.addDisposableTo
  • Deprecates aggregate in favor of reduce
  • Deprecates variable in favor of shareReplay(1) (to be consistent with RxJS version)

Check out Migration guide to RxSwift 2.0

Don't miss a new RxSwift release

NewReleases is sending notifications on new releases.