Skip to content

Invalid hook call on react 17 #4

Description

@damdinsharav

Hi,
I'm getting following error in React 17.
What could be the issue? Maybe incompatibility. I am getting started with React and have no clue.

Uncaught Error: Invalid hook call. ...

...
The above error occured in the <Radar> component:
at Radar(http://localhost:3000/static/js/0.chunk.js:63974:21)
at div
at Techradar
at App

index.js

import React from 'react;
import ReactDOM from 'react-dom';
import TechRadar from "./TechRadar";

const App = () => {
   return <TechRadar />;
};

ReactDOM.render(<App />, document.querySelector(#root));

TechRadar.js

import React from 'react';
import Radar from 'react-tech-radar';

const TechRadar = ()=> {

    const setup = {
        rings: ['adopt', 'trial', 'assess', 'hold'],
        quadrants: ['tools', 'techniques', 'platforms', 'languages'],
        data: [
            {
                name: 'D3',
                quadrant: 'tools',
                ring: "assess"

            },
            {
                name: 'TypeScript',
                quadrant: 'languages',
                ring: "trial"
            },
            {
                name: 'Storybook',
                quadrant: 'tools',
                ring: "adopt"
            }
        ]
    };

    return (
        <div className="TechRadar">
            <Radar {...setup} />
        </div>
    );
}

export default TechRadar;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions