Skip to content

Commit

Permalink
Update .changeset/gold-mice-pretend.md
Browse files Browse the repository at this point in the history
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
  • Loading branch information
2 people authored and MichaelDeBoey committed Aug 4, 2022
1 parent 03ee391 commit 9483441
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .changeset/gold-mice-pretend.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ 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 this and instead recommended you to use a "shim" to add `import React from 'react'` to your files 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)
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 this and instead recommended you to use a "shim" to add `import React from 'react'` to your files 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 9483441

Please sign in to comment.