pomber / didact

A DIY guide to build your own React
https://pomb.us/build-your-own-react/
6.29k stars 531 forks source link

Tips "react-scripts": "5.0.0" will course jsx error #38

Open yinsang opened 2 years ago

yinsang commented 2 years ago

pragma and pragmaFrag cannot be set when runtime is automatic.


/** @jsx Didact.createElement */
const element = (
  <div id="foo">
    <a href="">bar</a>
    <b></b>
  </div>
)

"react-scripts": "3.0.0" was OK.

tannguyencse19 commented 2 years ago

1/3/2022

Got it too.

Ha0ran2001 commented 1 year ago

8/11/2022 Got it too.

sachin2323 commented 9 months ago

/* @jsxRuntime classic / /* @jsx Didact.createElement /

You can use this to solve the above error, it worked for me, just change jsx runtime to classic mode