Closed jbagaresgaray closed 2 months ago
I get the same issue
me too
I created a patch that fixes this, looks like a few files just forgot to add imports:
diff --git a/node_modules/react-native-wagmi-charts/lib/module/charts/line/Data.js b/node_modules/react-native-wagmi-charts/lib/module/charts/line/Data.js
index 1b6f9d0..50fce97 100644
--- a/node_modules/react-native-wagmi-charts/lib/module/charts/line/Data.js
+++ b/node_modules/react-native-wagmi-charts/lib/module/charts/line/Data.js
@@ -1,4 +1,4 @@
-import { createContext, useContext, useMemo } from 'react';
+import React, { createContext, useContext, useMemo } from 'react';
export const DefaultLineChartId = '__LineChartData';
const LineChartDataContext = /*#__PURE__*/createContext({
[DefaultLineChartId]: []
diff --git a/node_modules/react-native-wagmi-charts/lib/module/charts/line/DatetimeText.js b/node_modules/react-native-wagmi-charts/lib/module/charts/line/DatetimeText.js
index e0ac259..f9fa3a4 100644
--- a/node_modules/react-native-wagmi-charts/lib/module/charts/line/DatetimeText.js
+++ b/node_modules/react-native-wagmi-charts/lib/module/charts/line/DatetimeText.js
@@ -1,3 +1,4 @@
+import React from 'react';
import { useLineChartDatetime } from './useDatetime';
import { AnimatedText } from '../../components/AnimatedText';
LineChartDatetimeText.displayName = 'LineChartDatetimeText';
diff --git a/node_modules/react-native-wagmi-charts/lib/module/charts/line/PriceText.js b/node_modules/react-native-wagmi-charts/lib/module/charts/line/PriceText.js
index 9551696..46d6936 100644
--- a/node_modules/react-native-wagmi-charts/lib/module/charts/line/PriceText.js
+++ b/node_modules/react-native-wagmi-charts/lib/module/charts/line/PriceText.js
@@ -1,3 +1,4 @@
+import React from 'react';
import { useLineChartPrice } from './usePrice';
import { AnimatedText } from '../../components/AnimatedText';
LineChartPriceText.displayName = 'LineChartPriceText';
@honeybadger26 Looks like this PR made the entire library unusable on web: https://github.com/coinjar/react-native-wagmi-charts/pull/172
The compiled JS files don't auto-import react/jsx-runtime
for some reason.
Hi all. Thanks for reporting this. I've made a PR to resolve this and will try to get a release out soon.
We shouldn't have to import React
since we're on version 18, but for whatever reason this doesn't work 🤷 I've brought back the imports so the compiled JS is correct.
Fixed in v2.5.3