question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support Observable.from(array_of_primitives)

See original GitHub issue

It seems that it is currently impossible to create an Observable from an array of primitives, e.g.:

char[] chars = "some string".toCharArray();
Observable.from(chars); //does not compile

Is this a conscious decision?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
akarnokdcommented, Nov 12, 2015
char[] chars = "string".toCharArray();

Observable.range(0, chars.length).map(i -> chars[i]).subscribe(...)
0reactions
ultraoncommented, Jun 22, 2017

Another way to do it: Observable.fromArray("string".split("")).map(s -> s.charAt(0)).subscribe(...)

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to create Observable from Array? - java - Stack Overflow
Essentially Observable.fromArray(arr) works the same as Observable.just(arr) , why is that (I wanna get 1, 2, 3 ...
Read more >
ObservableArray (JavaFX 8) - Oracle Help Center
ObservableArray is an array that allows listeners to track changes when ... You can find them in subclasses as they deal with primitive...
Read more >
Creating observable state - MobX
Properties, entire objects, arrays, Maps and Sets can all be made observable. The basics of making objects observable is specifying an annotation per ......
Read more >
Observables · MobX Guide - mamaya-spark
Observables can be JS primitives, references, plain objects, class instances, arrays and maps. observable(value) is a convenience overload, ...
Read more >
How to use the mobx.observable.array function in mobx - Snyk
To help you get started, we've selected a few mobx.observable.array examples, ... js/mobx primitive objects store[key] = dataValue; } else if (!storeValue) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found