React-joyride: Can't use React Component as Custom tooltipComponent

Created on 15 Jan 2019  路  1Comment  路  Source: gilbarbara/react-joyride

馃悰 Bug Report

version 2.0.2
When using a react component as tooltipComponent, the App crashed.(won't crash if using version 2.0.1)

To Reproduce

const Tooltip = () => (
  <div>tooltip</div>
)
  1. use this tooltip as a custom tooltipComponent.
  2. run the app
  3. click the beacon

Expected behavior

no error is thrown

Link to repl or repo (highly encouraged)

https://codesandbox.io/s/1v1yvk2x0q

Run npx envinfo --system --binaries --npmPackages react-floater

npx: installed 1 in 6.059s

  System:
    OS: Windows 10
    CPU: (4) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 1.44 GB / 10.00 GB
  Binaries:
    Node: 8.12.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.7.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD

Most helpful comment

hey,

You need to use the props that are provided to custom components as described in the docs.
The tooltip must have a ref.

const Tooltip = ({ tooltipProps }) => <div {...tooltipProps}>tootip</div>;

>All comments

hey,

You need to use the props that are provided to custom components as described in the docs.
The tooltip must have a ref.

const Tooltip = ({ tooltipProps }) => <div {...tooltipProps}>tootip</div>;
Was this page helpful?
0 / 5 - 0 ratings

Related issues

pokonski picture pokonski  路  3Comments

captainkovalsky picture captainkovalsky  路  6Comments

msalsas picture msalsas  路  3Comments

adnux picture adnux  路  4Comments

jjordy picture jjordy  路  3Comments