Skip to content
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

fix: jsx factory types #565

Merged
merged 1 commit into from
Feb 24, 2022
Merged

fix: jsx factory types #565

merged 1 commit into from
Feb 24, 2022

Conversation

rabelloo
Copy link
Contributor

Purpose

Fix TypeScript compilation for users with factories other than react-jsx

Approach

Declare React as a local variable in each place where JSX is used

Testing

Castor linting passes, tested in an Onfido internal app too and it works as well

Risks

The workaround is quite inelegant, ideally TypeScript would be able to understand factory boundaries.
Without a proper solution migrating Castor itself to react-jsx sounds like a bad idea.

@rabelloo rabelloo added the bug Something isn't working label Feb 23, 2022
@rabelloo rabelloo requested a review from josokinas February 23, 2022 18:57
@rabelloo rabelloo self-assigned this Feb 23, 2022
@vercel
Copy link

vercel bot commented Feb 23, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/onfido-oss/castor-icons/ErFF35zgQ1fzr2bPHdAkTNgwJDzx
✅ Preview: https://castor-icons-git-fix-jsx-onfido-oss.vercel.app

@rabelloo rabelloo merged commit 9c22d6f into main Feb 24, 2022
@rabelloo rabelloo deleted the fix/jsx branch February 24, 2022 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants