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

Compatibility with Preact #135

Open
Inve1951 opened this issue Dec 18, 2019 · 1 comment
Open

Compatibility with Preact #135

Inve1951 opened this issue Dec 18, 2019 · 1 comment

Comments

@Inve1951
Copy link

Preact calls render with arguments. This is an iconic feature which allows destructuring props, state, and context in the parameter list. Currently ReSub breaks that pattern when Options.preventTryCatchInRender is falsy (which is the default).

Restoring compatibility should be as easy as forwarding the arguments list here.

Apparently I also have to manually set Options.development in order to get the TypeError thrown from destructuring undefined since my pipeline replaces the literal process.env.NODE_ENV at build time whereas you carefully test it for existence. I'll give that a shot tomorrow.

As a result my Components just rendered nothing and my coffee got cold.

Can we have this fixed?
If you want a PR it will have to wait till after the holidays.

@deregtd
Copy link
Collaborator

deregtd commented Dec 18, 2019

We'd be happy to look at/take in a PR for it, but none of us on the team are using Preact or have any good way to test this, so it'd be better if you found an implementation you were happy with that you could test and we could just verify that it doesn't break anything else.

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