bland-microphone-36930
08/23/2023, 7:39 AMwhite-fireman-22476
08/23/2023, 7:40 AMbland-microphone-36930
08/23/2023, 8:08 AMwhite-fireman-22476
08/23/2023, 8:14 AMbland-microphone-36930
08/23/2023, 9:28 AMwhite-fireman-22476
08/23/2023, 9:34 AMgetFeatureValue
work?bland-microphone-36930
08/23/2023, 9:37 AMwhite-fireman-22476
08/23/2023, 9:39 AMisOn
. Does that work?bland-microphone-36930
08/23/2023, 9:41 AM<GrowthBookProvider growthbook={growthbook}>
is not required in return
white-fireman-22476
08/23/2023, 9:51 AMbland-microphone-36930
08/23/2023, 9:52 AMwhite-fireman-22476
08/23/2023, 9:54 AMuseFeatureIsOn
should work for react native... but you do need to set the GrowthbookProvider because that gives the components below it the growthbook context.isOn
directly on the growthbook object then it is not needed.bland-microphone-36930
08/23/2023, 1:40 PMGrowthbookProvider
useFeatureIsOn is not workingwhite-fireman-22476
08/23/2023, 2:35 PMuseFeatureIsOn
is calling isOn
under the hood: https://github.com/growthbook/growthbook/blob/49d9852c46e574c0f3fad25077adb68a230367ba/packages/sdk-react/src/GrowthBookReact.tsx#L108 if you setting the GrowthbookProvider it should be able to load the growthbook object from the context and use it. Are you seeing an error message or anything?bland-microphone-36930
08/24/2023, 5:38 AMwhite-fireman-22476
09/06/2023, 9:30 AM• React Native does not support the native EventSource API, which is the standard way of creating an SSE connection in the browser. To use SSE on React Native, you need to use a third-party library that provides a polyfill or a wrapper for the EventSource API. For example, you can use [react-native-event-source] or [rn-eventsource], which are both npm packages that you can install and import in your React Native project.
• React Native does not support the native fetch API, which is often used to send requests to the server that initiates the SSE connection. To use fetch on React Native, you need to use a third-party library that provides a polyfill or a wrapper for the fetch API. For example, you can use [react-native-fetch-polyfill] or [whatwg-fetch], which are both npm packages that you can install and import in your React Native project.
• React Native does not support the native URL API, which is sometimes used to parse and manipulate URLs for the SSE connection. To use URL on React Native, you need to use a third-party library that provides a polyfill or a wrapper for the URL API. For example, you can use [react-native-url-polyfill] or [url-polyfill], which are both npm packages that you can install and import in your React Native project.
By using these libraries, you can create and use an SSE connection on React Native similar to how you would do it on the web.
gb.refreshFeatures()