0

i am trying to implement storybook with antdv, when I import a tsx file which returns jsx inside button.stories.js, I got "ReferenceError: React is not defined" you can see error here but react is not the part of this project at all, it is a vue js project and all tsx and jsx is returned from tsx files but under the hood they are all vue js files as they use vue js features.

all kind of help is appreciated

1 Answers1

0

Probably its an error with configuration on JSX transpiler,i think a solution can be import react even if you don't use it import React from 'react';

aromeral98
  • 11
  • 2
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 18 '22 at 23:15