Skip to content

chore: react 18 support release #796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 20 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,6 @@

Or see it on [Github Page](https://wwayne.github.io/react-tooltip).

## INACTIVE PROJECT

The future of this project will be discussed here: https://github.com/wwayne/react-tooltip/issues/794

We hope to identify a fork of this project which will be actively maintained and can accept PRs and publish regularly to NPM.

One current fork and npm package is at https://www.npmjs.com/package/react-tooltip-rc, but the publisher has not yet committed to further maintenance.

## Maintainers

[alexgurr](https://github.com/alexgurr) Casual maintainer - accepting PRs and doing minor testing/development.

[aronhelser](https://github.com/aronhelser) Passive maintainer - accepting PRs and doing minor testing, but not fixing issues or doing active development.

[roggervalf](https://github.com/roggervalf) inactive maintainer - no longer seems to be doing development.

[huumanoid](https://github.com/huumanoid) (inactive)

We would gladly accept a new maintainer to help out!

## Installation

```sh
Expand Down Expand Up @@ -119,8 +99,10 @@ Notes:
The `html` option allows a tooltip to directly display raw HTML. This is a security risk if any of that content is supplied by the user. Any user-supplied content must be sanitized, using a package like [sanitize-html](https://www.npmjs.com/package/sanitize-html). We chose not to include sanitization after discovering it [increased our package size](https://github.com/wwayne/react-tooltip/issues/429) too much - we don't want to penalize people who don't use the `html` option.

#### JSX Note

You can use React's [`renderToStaticMarkup`-function](https://reactjs.org/docs/react-dom-server.html#rendertostaticmarkup) to use JSX instead of HTML. You still need to set `data-html={true}`.
**Example:**

```jsx
import ReactDOMServer from 'react-dom/server';
[...]
Expand Down Expand Up @@ -196,22 +178,22 @@ Same for empty children, if you don't want show the tooltip when the children is

### 3. Tooltip not binding to dynamic content

When you render `<ReactTooltip>` ahead of dynamic content, and are using `data-for={id}` attributes
on new dynamic content, the tooltip will not register its event listener.
When you render `<ReactTooltip>` ahead of dynamic content, and are using `data-for={id}` attributes
on new dynamic content, the tooltip will not register its event listener.

For example, you render a generic tooltip in the root of your app, then load a list of content async.
Elements in the list use the `data-for={id}` attribute to bind the tooltip on hover.
Since the tooltip has already scanned for data-tip these new elements will not trigger.

One workaround for this is to trigger `ReactTooltip.rebuild()` after the data load to scan for the attribute again,
One workaround for this is to trigger `ReactTooltip.rebuild()` after the data load to scan for the attribute again,
to allow event wireup.

#### Example

```jsx
<app>
<ReactTooltip id="foo" />
<list/>
<list />
</app>
```

Expand All @@ -238,6 +220,20 @@ return(

[How I insert sass into react component](https://medium.com/@wwayne_me/how-i-insert-sass-into-my-npm-react-component-b46b9811c226#.gi4hxu44a)

## Maintainers

[danielbarion](https://github.com/danielbarion) Casual maintainer - accepting PRs and doing minor testing/development.

[alexgurr](https://github.com/alexgurr) Casual maintainer - accepting PRs and doing minor testing/development.

[aronhelser](https://github.com/aronhelser) Passive maintainer - accepting PRs and doing minor testing, but not fixing issues or doing active development.

[roggervalf](https://github.com/roggervalf) inactive maintainer - no longer seems to be doing development.

[huumanoid](https://github.com/huumanoid) (inactive)

We would gladly accept a new maintainer to help out!

## Contributing

We welcome your contribution! Fork the repo, make some changes, submit a pull-request! Our [contributing](contributing.md) doc has some details.
Expand Down
6 changes: 6 additions & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# system files
*.log
.DS_Store*
.idea/

*.lock
Loading