Skip to content

Commit 083edfb

Browse files
authored
fix: made it possible to pass uuid instead of generating one internally (#583)
When passing the `uuid` prop ReactTooltip will not generate one itself so you can have a predictable ID when using SSR strategies" fix #580
1 parent e518600 commit 083edfb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class ReactTooltip extends React.Component {
8686
super(props);
8787

8888
this.state = {
89-
uuid: generateUUID(),
89+
uuid: props.uuid || generateUUID(),
9090
place: props.place || "top", // Direction of tooltip
9191
desiredPlace: props.place || "top",
9292
type: "dark", // Color theme of tooltip

0 commit comments

Comments
 (0)