Skip to content

Commit cb05513

Browse files
authored
Merge pull request #965 from ReactTooltip/docs/v4-rebuild
Add section about `ReactTooltip.rebuild()` to the docs
2 parents b3dea62 + c482f9d commit cb05513

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ In versions >=5.8.0, we've introduced the `data-tooltip-id` attribute, and the `
5353

5454
1 . Import the CSS file to set default styling.
5555

56+
> :warning: You must import the CSS file or the tooltip won't show!
57+
5658
```js
5759
import 'react-tooltip/dist/react-tooltip.css'
5860
```

docs/docs/examples/anchor-select.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebar_position: 1
44

55
# Anchor select
66

7-
Default color stylings available for the ReactTooltip component.
7+
Using the ReactTooltip anchor select prop.
88

99
import { Tooltip } from 'react-tooltip'
1010
import 'react-tooltip/dist/react-tooltip.css'

docs/docs/getting-started.mdx

+6
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ For more info and more complex use cases using `anchorSelect`, check [the exampl
5858

5959
### Set the default styling
6060

61+
:::caution
62+
63+
You must import the CSS file or the tooltip won't show!
64+
65+
:::
66+
6167
```js
6268
import 'react-tooltip/dist/react-tooltip.css'
6369
```

docs/docs/upgrade-guide/changelog-v4-v5.md

+9
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ This resulted in a great improvement in performance, and made it easier for the
3232
- `getContent` prop was removed. Instead, you can directly pass dynamic content to the `content` tooltip prop, or to `data-tooltip-content` in the anchor element
3333
- Default behavior of tooltip now is equivalent to V4's `solid` effect, instead of `float`. The new `float` prop can be set to achieve V4's `effect="float"`. See [Options](../options.mdx) for more details
3434

35+
## What about `ReactTooltip.rebuild()`?
36+
37+
A common question V4 users have when upgrading to V5 is about `ReactTooltip.rebuild()`.
38+
Rebuilding the tooltip was a required step when using V4 with dynamic content. It isn't necessary when using V5.
39+
40+
The tooltip component now automatically watches for any changes made to the DOM and updates accordingly, without any extra steps needed.
41+
42+
If you run into any problems with the tooltip not updating after changes are made in other components, please open a [GitHub issue](https://github.com/ReactTooltip/react-tooltip/issues/new/choose) reporting what you find, ideally with a sample [CodeSandbox](https://codesandbox.io/) (or something similar) to help us pinpoint the problem.
43+
3544
## New Props
3645

3746
- [x] `classNameArrow`

0 commit comments

Comments
 (0)