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.

TypeError: undefined is no a function (near '... CombineLastest.combineLastest...) in React-native

See original GitHub issue

Anotación 2020-02-25 220058

just i uses the “WithObservables” in one Component

this is my package:

“dependencies”: { “@nozbe/watermelondb”: “^0.15.0”, “@nozbe/with-observables”: “^1.0.5”, “@react-native-community/masked-view”: “^0.1.6”, “@react-navigation/bottom-tabs”: “^5.0.5”, “@react-navigation/native”: “^5.0.3”, “@react-navigation/stack”: “^5.0.3”, “react”: “16.9.0”, “react-native”: “0.61.5”, “react-native-gesture-handler”: “^1.5.6”, “react-native-reanimated”: “^1.7.0”, “react-native-safe-area-context”: “^0.7.3”, “react-native-screens”: “^2.0.0-beta.2”, “recompose”: “^0.30.0” }, “devDependencies”: { “@babel/core”: “^7.6.2”, “@babel/plugin-proposal-decorators”: “^7.8.3”, “@babel/runtime”: “^7.6.2”, “@react-native-community/eslint-config”: “^0.0.5”, “@types/jest”: “^24.0.24”, “@types/react-native”: “^0.60.25”, “@types/react-test-renderer”: “16.9.1”, “@typescript-eslint/eslint-plugin”: “^2.12.0”, “@typescript-eslint/parser”: “^2.12.0”, “babel-jest”: “^24.9.0”, “eslint”: “^6.5.1”, “jest”: “^24.9.0”, “metro-react-native-babel-preset”: “^0.56.0”, “react-test-renderer”: “16.9.0”, “typescript”: “^3.7.3”

this is the component where i use

import React from ‘react’ import { SafeAreaView, StyleSheet, ScrollView, View, Text, StatusBar, } from ‘react-native’; import withObservables from ‘@nozbe/with-observables’ type homeProps = { database?: any, user?: any, name?: string, Mensaje?: string } function Home(props: homeProps) { console.log(Componente home ${props.Mensaje}) return ( <View> <Text>Holaaaaa</Text> <Text>{props.name}</Text> <Text>{props.Mensaje}</Text> </View> ) } const enhance = withObservables([‘Mensaje’], ({ Mensaje }) => { Mensaje }) const EnhancedHome = enhance(Home) export default EnhancedHome;

Really pls HelpMe

Regards

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
coreyRallicommented, Feb 26, 2020

I am getting this error as well when trying to make multiple observations in one component. Digging into with-observables.cjs.js (line 53) combineLatest is undefined (it skips combineLatest when only one prop is observed).

This seems related to the breaking import changes to rxjs multiple people seem to be having (refer to PR #66 in with-observables: https://github.com/Nozbe/withObservables/pull/66

0reactions
FabianEscaratecommented, Mar 2, 2020

Hi again.

Works!!. just i tried over and over again. I was using it wrong the “WithObservable”

thanks a lot

regards!

Read more comments on GitHub >

github_iconTop Results From Across the Web

React-Native - ERROR TypeError: undefined is not a function ...
Sure that is not an array. For sure, you can write the following: const data = Array.isArray(itemData) ? itemData : [].
Read more >
[Solved]-RxJS flatMapLatest is not a function-rx.js
In RxJS 5, flatMapLatest has been renamed to switchMap . var suggestions = distinct.switchMap(searchWikipedia);. m59 42486. Source: stackoverflow.com ...
Read more >
Observable | RxJS API Document - ReactiveX
combineLatest accepts as optional parameter project function, which takes as arguments all values that would normally be emitted by resulting Observable.
Read more >
combineLatest - RxJS
combineLatest link. function deprecated operator ... combineLatest<T, R>(...args: (ObservableInput<any> | ((...values: any[]) => R))[]): OperatorFunction<T, ...
Read more >
A glitch in combineLatest (and how to fix it!)
We then use switchMap to fetch the data from the backend based on these values to get a pokemon$ . Because we use...
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