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

ForwardRef is not properly supported in Preact #1160

Closed
11 tasks
crutchcorn opened this issue May 7, 2023 · 0 comments · Fixed by #1170
Closed
11 tasks

ForwardRef is not properly supported in Preact #1160

crutchcorn opened this issue May 7, 2023 · 0 comments · Fixed by #1170
Labels
bug Something isn't working

Comments

@crutchcorn
Copy link
Contributor

I am interested in helping provide a fix!

Yes

Which generators are impacted?

  • All
  • Angular
  • HTML
  • Qwik
  • React
  • React-Native
  • Solid
  • Stencil
  • Svelte
  • Vue
  • Web components

Reproduction case

https://mitosis.builder.io/?outputTab=A4JwpghgxgLkA%3D%3D%3D&code=KYDwDg9gTgLgBAE2AMwIYFcA29noHYDGMAlhHnALICeAwhALaR7B4wAUYUEYAzgJRwA3gCg4cKMBjoo5NqLFwAPAmIA3cSgC8gztx4A6GMB4wAvgD4AKsZiKA9CtXn5fANzDTQA%3D

Expected Behaviour

Using a ref inside of a Preact component adds forwardRef, per its shared rendering code with React.

But forwardRef isn't needed or available in Preact unless you're using the compat mode, which we're hoping to avoid.

Actual Behaviour

Ideally, we should simply pass the ref to the component without changing anything else.

Additional Information

No response

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 a pull request may close this issue.

1 participant