slmgc/react-hint

React 16: TypeError

r3wt opened this issue · 1 comments

r3wt commented

Hello, I am trying to get started with your library. However, the following code is giving me an error.

Tooltip.js

import React from 'react';
import ReactHintFactory from 'react';
const ReactHint = ReactHintFactory(React);

const events = {
    click: true,
    focus: false,
    hover: false
};

const Tooltip = (props) => {
    return <ReactHint position="right" attribute="data-tooltip" events={events} {...props} />
};

export default Tooltip;

gives following error:

TypeError: (0 , _react2.default) is not a function
./src/components/Tooltip.js

image

r3wt commented

Oh brother. Stupid autocomplete in VSCode. Sorry about this. Its a non issue.