Skip to content

Commit 147e208

Browse files
committed
Update README.md
1 parent 31d00f5 commit 147e208

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

README.md

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -207,29 +207,8 @@ Although ReactFX has some asynchronous operators like `threadBridge`, ReactFX em
207207

208208
If you are heavily dependent on RxJava, asynchronous processing, or do not want your entire reactive codebase to be UI-focused, you will probably want to use RxJavaFX.
209209

210-
211-
212210
##Notes for Kotlin
213-
If you are building your JavaFX application with [Kotlin](https://kotlinlang.org/), check out [RxKotlinFX](https://github.com/thomasnield/RxKotlinFX) to leverage this library through Kotlin extension functions.
214-
215-
```kotlin
216-
fun <T> Observable<T>.toBinding() = JavaFxSubscriber.toBinding(this)
217-
fun <T> Observable<T>.toBinding(errorHandler: (Throwable) -> Unit) = JavaFxSubscriber.toBinding(this,errorHandler)
218-
fun <T> ObservableValue<T>.toObservable() = JavaFxObservable.fromObservableValue(this)
219-
fun <T> ObservableValue<T>.toObservableChanges() = JavaFxObservable.fromObservableValueChanges(this)
220-
fun <T: Event> Node.toNodeEvents(eventType: EventType<T>) = JavaFxObservable.fromNodeEvents(this, eventType)
221-
fun <T> Observable<T>.observeOnFx() = this.observeOn(JavaFxScheduler.getInstance())
222-
```
223-
This allows you to better use Kotlin's features to interop JavaFX and RxJava much more cleanly.
224-
225-
```kotlin
226-
val textField = TextField()
227-
val textInputs = textField.toObservable()
228-
val lengthBinding = textInputs.map { it.length }.toBinding()
229-
```
230-
231-
If you are doing JavaFX and Kotlin development, definitely check out [TornadoFX](https://github.com/edvin/tornadofx) as well to utilize type-safe builders and other features enabled by Kotlin.
232-
211+
If you are building your JavaFX application with [Kotlin](https://kotlinlang.org/), check out [RxKotlinFX](https://github.com/thomasnield/RxKotlinFX) to leverage this library through Kotlin extension functions. Definitely check out [TornadoFX](https://github.com/edvin/tornadofx) as well to utilize type-safe builders and other patterns enabled by Kotlin.
233212

234213
## Comprehensive Example
235214
```java

0 commit comments

Comments
 (0)