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

Integrating with Feliz #15

Open
leolorenzoluis opened this issue Feb 10, 2023 · 4 comments
Open

Integrating with Feliz #15

leolorenzoluis opened this issue Feb 10, 2023 · 4 comments

Comments

@leolorenzoluis
Copy link

Hi,

It's me again. Sorry if I keep asking a lot of questions as I'm learning too, but do you know how to integrate Lit with React properly? I am aware of the Lit.React.toLit binding but I can't grok how to manage the lifecycles between the two.

@JordanMarr
Copy link
Owner

Though i have developed apps with Feliz and Fable.Lit, I have never tried to share components between them. But I am very interested to see how this would work.

Is there an example of how to use this posted somewhere?

@leolorenzoluis
Copy link
Author

@JordanMarr https://github.com/fable-compiler/Fable.Lit/blob/main/sample/App.fs#L31 I am trying but it looks like I'm getting bug when hooking it up with the lifecycle of react using the toLit that was provided. I'm not sure if I should pursue this path as Alfonso mentioned that he's not sure if it has performance issues. See fable-compiler/Fable.Lit#61

@JordanMarr
Copy link
Owner

Which React control are you trying to use?

@leolorenzoluis
Copy link
Author

leolorenzoluis commented Feb 11, 2023

Just a custom one with react-transition-group. I conclude mixing Lit and React doesn't play nice with its own lifecycles. :) I figure out the bugs. The props can updated, but within that library it wants the change notification within react (react-transition-group library).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants