TypeError: from.from is not a function. (In 'from.from(observables[0])', 'from.from' is undefined)
See original GitHub issueHere is my component
const PlaylistItem = ({playlist}) => {
console.log(playlist);
return (
<List.Item
title={playlist.title}
description="by you"
left={props => <List.Icon {...props} icon="audiotrack" />}
/>
);
};
const enhance = withObservables(['playlist'], ({playlist}) => ({
playlist
}));
export default enhance(PlaylistItem);
Here is how I call the component
<FlatList
data={this.state.playlists}
renderItem={(item) => <PlaylistItem playlist={item} />}
/>
This is my query
async componentDidMount(){
const playlists = database.collections.get('playlists');
const allPlaylists = await playlists.query().fetch();
console.log("playlist ", allPlaylists);
this.setState({
playlists: allPlaylists
})
}
Please help me. I am not able to understand the problem. If I remove withObservables and export as it is, it is working fine.
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (5 by maintainers)
Top Results From Across the Web
Observable_1.Observable.from is not a function - Stack Overflow
I am trying to create a unit test in angular-6. import { TodosComponent } from './todos.component'; import { ...
Read more >TypeError: "x" is not a constructor - JavaScript - MDN Web Docs
The JavaScript exception "is not a constructor" occurs when there was an attempt to use an object or a variable as a constructor,...
Read more >48 answers on StackOverflow to the most popular Angular ...
I gathered the most common questions and answers from Stackoverflow. These questions were chosen by the highest score received. Whether you are an...
Read more >Receiving Uncaught TypeError: self.userName is not a function
Hi Experts, I am a beginner in Ojet and was doing a course. While in Lecture 44 I am receiving below error while...
Read more >Observables - Knockout.js
Observables. Knockout is built around three core features: Observables and dependency tracking; Declarative bindings; Templating. On this page, you'll learn ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The walk around for this issue is to change
var from = require('rxjs/observable/from');tovar from = require('rxjs');in\node_modules\@nozbe\with-observables\dist\with-observables.cjs.jsSorry to reopen this discussion, but I was experiencing the same
from.from is undefinedthat @YajanaRao was experiencing.The solution they proposed (modifying the import in
with-observables.cjs.jsdid resolve the issue, but obviously that’s just a workaround, not a permanent fix.Are there any suggestions as to what the underlying issue could be, and how that can be resolved? Is it as simple as changing the import, or coudl that have knock-on effects?