developit / undom

🍩 1kb minimally viable DOM Document implementation
https://npm.im/undom
MIT License
671 stars 25 forks source link

Does this need to be updated for Preact X? #28

Closed feross closed 4 years ago

feross commented 5 years ago

I quickly tried updating to the Preact X (10.0.0-beta.3) and found that an empty DOM was being rendered. I haven't had time to dig into it further, but my guess is that the VNode shape changes in Preact X have something to do with it, and this package will need to be updated. Is that right?

staydecent commented 5 years ago

I'm also having issues with Preact X. I can get the initial render in undom, but subsequent diffs/updates don't seem to call anything within undom. I tried tracking it down, but just don't know the Preact source that well. I'd venture there is some if statement relying on a dom feature that undom is missing, preventing it from calling setAttribute, appendChild, or the like.

I've got 8.5.2 working here: https://github.com/staydecent/nativescript-preact/tree/cc7acefe6bd59cef91631893f647198dc598a2b4 And PreactX struggling here: https://github.com/staydecent/nativescript-preact/tree/92789adac7de6218e74c95d4c14bcc6cfe533d38

staydecent commented 5 years ago

Well, it's rough and I'd like to eventually make a proper fork, but got a variation of undom working with preactx: https://gist.github.com/staydecent/25e81f625335e5bd0c157c5d0cf4d084

JamieMason commented 4 years ago

I know you're busy @developit but if you have the time I'd be happy to try and contribute a fix for this, I just need a little more background information to help me get started. Thanks.

feross commented 4 years ago

I think this is resolved now.

JamieMason commented 4 years ago

Hey @feross, do you have any more information that could help me? I had the same issue in December 2019 but the most recent commit to master in this repo is still prior to that in March 2019. I was having what appeared to be the same problem as you and have parked that project while waiting on a response to this issue.