React-tooltip: Where to put ReactTooltip

Created on 28 Jul 2016  路  2Comments  路  Source: wwayne/react-tooltip

Hi,

I want to be able to put data-tip all over my code, so I've tried having a single <ReactTooltip /> at the top level of my layout. This doesn't work however, since it does dynamically refresh when the page changes.

What should I be doing? Should I have a new in every component that includes a data-tip?

Most helpful comment

  1. You can put ReactTooltip in your every component, remember give their unique id
  2. Call ReactTooltip.rebuild() after component fresh

I know it may sounds inconvenient, so the tooltip may change its implementation in the future https://github.com/wwayne/react-tooltip/issues/137

All 2 comments

  1. You can put ReactTooltip in your every component, remember give their unique id
  2. Call ReactTooltip.rebuild() after component fresh

I know it may sounds inconvenient, so the tooltip may change its implementation in the future https://github.com/wwayne/react-tooltip/issues/137

You put <ReactTooltip /> at the top level of your layout and call ReactTooltip.rebuild() on componentDidUpdate.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kristinadarroch picture kristinadarroch  路  3Comments

oran1248 picture oran1248  路  3Comments

antofa picture antofa  路  4Comments

tatsujb picture tatsujb  路  4Comments

donilan picture donilan  路  4Comments