Skip to content

feat: Custom JSX runtime #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Dec 20, 2024
Merged

feat: Custom JSX runtime #20

merged 14 commits into from
Dec 20, 2024

Conversation

jmoseley
Copy link
Contributor

Proposed changes

  • Move to our own JSX runtime, that executes the tree directly
  • Remove the need for resolve, components just return their final value directly, or pass it to their children if specified.

Further comments

This is a full rewrite of what we had, and requires that consumers of the lib use our JSX runtime (typescript docs). This should not be too much of a hurdle, and gives us full control of the rendering of the tree, and removes the dependency on React.

@jmoseley jmoseley changed the title Simplify the JSX API. feat: Custom JSX runtime Dec 20, 2024
@jmoseley
Copy link
Contributor Author

I imported the package into cortex-api to make sure it works, and it looks like things are functioning:

https://github.com/cortexclick/cortex/compare/jeremy/gensx#diff-8005314294b9a664e462bbeb614dfc306aefa7a4c1cd5d6994935879b304afc0R18

Copy link
Member

@EvanBoyle EvanBoyle left a comment

Choose a reason for hiding this comment

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

Few questions/comments, but things are looking good!

Copy link
Member

@EvanBoyle EvanBoyle left a comment

Choose a reason for hiding this comment

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

Let's go ahead and ship it. We can continue reving on the rest and figure out more about type safety as we experiment with LSP/compiler extension support.

@jmoseley jmoseley merged commit 14d417c into main Dec 20, 2024
4 checks passed
@jmoseley jmoseley deleted the jeremy/annotations branch December 20, 2024 22:08
jmoseley added a commit that referenced this pull request Mar 11, 2025
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