Skip to content

fix(create-rslib): set tsconfig jsx to react-jsx#516

Merged
fi3ework merged 4 commits intomainfrom
react_jsx_1204
Dec 4, 2024
Merged

fix(create-rslib): set tsconfig jsx to react-jsx#516
fi3ework merged 4 commits intomainfrom
react_jsx_1204

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

React >= 17 should use react-jsx instead of react.

image

Related Links

https://www.typescriptlang.org/tsconfig/#jsx

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Dec 4, 2024

CodSpeed Performance Report

Merging #516 will improve performances by 76.95%

Comparing react_jsx_1204 (64c96b8) with main (ecf9d6f)

Summary

⚡ 1 improvements
✅ 4 untouched benchmarks

Benchmarks breakdown

Benchmark main react_jsx_1204 Change
examples/react-component-bundle 351.6 ms 198.7 ms +76.95%

Copy link
Copy Markdown
Member

@fi3ework fi3ework left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was for compatibility reasons. As we didn't require a minimal react >= 16.14.0 in peer dep.

need to be updated alongside.

I checked some mainstream React libraries:

  • antd: classic
  • @tanstack/react-query: automatic
  • react-router: classic
  • mobx-react: classic
  • framer-motion: automatic

I believe moving to the new JSX runtime for new libraries is a positive step. This change can help avoid potential migration costs in the future.

@chenjiahan
Copy link
Copy Markdown
Member Author

Agreed, I have updated rslib.config.* to match with 'react-jsx`.

@netlify
Copy link
Copy Markdown

netlify bot commented Dec 4, 2024

Deploy Preview for rslib ready!

Name Link
🔨 Latest commit 64c96b8
🔍 Latest deploy log https://app.netlify.com/sites/rslib/deploys/6750472ac0a94d0008bdab0a
😎 Deploy Preview https://deploy-preview-516--rslib.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@fi3ework fi3ework merged commit 78114bc into main Dec 4, 2024
@fi3ework fi3ework deleted the react_jsx_1204 branch December 4, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants