You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/troubleshooting.mdx
+38-38Lines changed: 38 additions & 38 deletions
Original file line number
Diff line number
Diff line change
@@ -64,44 +64,6 @@ If you've imported the default styling and the tooltip is still not showing up w
64
64
65
65
If `data-tooltip-content` and `data-tooltip-html` are both unset (or they have empty values) on the anchor element, and also the `content`, `render`, and `children` props on the tooltip are unset (or have empty values), the tooltip is not shown by default.
66
66
67
-
## Next.js `TypeError: f is not a function`
68
-
69
-
This problem seems to be caused by a bug related to the SWC bundler used by Next.js.
70
-
The best way to solve this is to upgrade to `next@13.3.0` or later versions.
71
-
72
-
Less ideally, if you're unable to upgrade, you can set `swcMinify: false` on your `next.config.js` file.
73
-
74
-
## Next.js `"use client"` error
75
-
76
-
This normally happens when you use `react-tooltip` inside a component that is not tagged as client component. For more info, see the [Next.js docs](https://nextjs.org/docs/getting-started/react-essentials#client-components).
77
-
78
-
To use `react-tooltip` on Next.js 13 without having to tag your component or page as a client component, just create a new file `ReactTooltip.tsx` (for this example, the file path is `src/components/ReactTooltip.tsx`) and place the following code inside of the created file:
79
-
80
-
:::caution
81
-
82
-
Avoid naming the file `react-tooltip.tsx` (or with whichever extension your project uses), since it may interfere with your editor's autocomplete funcionality.
83
-
84
-
:::
85
-
86
-
```jsx
87
-
// src/components/ReactTooltip.tsx
88
-
'use client'
89
-
90
-
export*from'react-tooltip'
91
-
```
92
-
93
-
And in the place that you are importing React Tooltip:
94
-
95
-
```jsx
96
-
// ❌ Old
97
-
import { Tooltip } from'react-tooltip'
98
-
```
99
-
100
-
```jsx
101
-
// ✅ New
102
-
import { Tooltip } from'components/react-tooltip'
103
-
```
104
-
105
67
## Bad performance
106
68
107
69
If you're experiencing any kind of unexpected behavior or bad performance on your application when using ReactTooltip, here are a few things you can try.
@@ -156,3 +118,41 @@ Check the examples for the [`anchorSelect`](./examples/anchor-select) and [`rend
156
118
</div>
157
119
<Tooltip id="my-tooltip"/>
158
120
```
121
+
122
+
## Next.js `TypeError: f is not a function`
123
+
124
+
This problem seems to be caused by a bug related to the SWC bundler used by Next.js.
125
+
The best way to solve this is to upgrade to `next@13.3.0` or later versions.
126
+
127
+
Less ideally, if you're unable to upgrade, you can set `swcMinify: false` on your `next.config.js` file.
128
+
129
+
## Next.js `"use client"` error
130
+
131
+
This normally happens when you use `react-tooltip` inside a component that is not tagged as client component. For more info, see the [Next.js docs](https://nextjs.org/docs/getting-started/react-essentials#client-components).
132
+
133
+
To use `react-tooltip` on Next.js 13 without having to tag your component or page as a client component, just create a new file `ReactTooltip.tsx` (for this example, the file path is `src/components/ReactTooltip.tsx`) and place the following code inside of the created file:
134
+
135
+
:::caution
136
+
137
+
Avoid naming the file `react-tooltip.tsx` (or with whichever extension your project uses), since it may interfere with your editor's autocomplete funcionality.
138
+
139
+
:::
140
+
141
+
```jsx
142
+
// src/components/ReactTooltip.tsx
143
+
'use client'
144
+
145
+
export*from'react-tooltip'
146
+
```
147
+
148
+
And in the place that you are importing React Tooltip:
0 commit comments