Skip to content

Commit

Permalink
Update gold-mice-pretend.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mcansh committed Jul 28, 2022
1 parent c2138ad commit 60f13fd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .changeset/gold-mice-pretend.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
use esbuild's new automatic jsx transform

there are no code changes from your end, but by using the new transform, we can prevent duplicate React imports from appearing in your build (#2987)

the automatic jsx transform was introduced in React 17 and allows you to write your React code without ever needing to import React to just write jsx, if you used `useState` or other hooks, you still needed it. However up until now, esbuild didnt support and instead recommended you to use a "shim" to import and re-export React to get the same affect. This unfortantely has caused some pain points with some external libraries resulting in React being declared multiple times, but no more! (chance said so himself, so... go tell him if it's busted)

0 comments on commit 60f13fd

Please sign in to comment.