kurt ak
08/31/2021, 4:47 PM"TypeError: Cannot read property 'Client' of undefined".
I just try to get the client like in Step #2 of the Firebase docsJason Bosco
08/31/2021, 4:48 PMkurt ak
08/31/2021, 4:49 PMJason Bosco
08/31/2021, 4:50 PMJason Bosco
08/31/2021, 4:50 PMkurt ak
08/31/2021, 4:51 PMimport React, { useEffect, useLayoutEffect, useState } from 'react';
import { HeaderBackButton, StackScreenProps } from '@react-navigation/stack';
import Typesense from 'typesense';
type ScreenProps = StackScreenProps<AppStackParamList, 'Explore'>;
let searchClient = new Typesense.Client({
nodes: [
{
host: '<http://pl8s6ubvg1afhmnwp-1.a1.typesense.net|pl8s6ubvg1afhmnwp-1.a1.typesense.net>',
port: '443',
protocol: 'https'
}
],
apiKey: 'my-api-key',
connectionTimeoutSeconds: 2
});
export default function ExploreScreen({ navigation, route }: ScreenProps) {
...
}
kurt ak
08/31/2021, 4:53 PMkurt ak
08/31/2021, 4:55 PMtypesense": "^0.14.0,
Jason Bosco
08/31/2021, 4:56 PMkurt ak
08/31/2021, 5:00 PM@babel/runtime
too. Thanks for the quick replies in any case!kurt ak
08/31/2021, 5:02 PMIf you choose to use this extension, you can skip directly to Step 4 below, once you set up the extension.
and then at Step 4, the code shows to use client variable, but not showing how to get the client.kurt ak
08/31/2021, 5:03 PMJason Bosco
08/31/2021, 5:03 PM