-
Notifications
You must be signed in to change notification settings - Fork 43
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
refmterr: Special case brisk-reconciler stateless component error #210
Comments
I wonder if a better solution might be to prevent this error entirely. The ppx could always insert some sort of hook even when none are necessary. This could always be transformed: let%component make = () => {
<View> someContainer </View>
}; Into this: let%component make = () => {
let%hook _ = Hooks.empty();
<View> someContainer </View>
}; Not sure if that will also have some sort of perf impact too though. |
@kyldvs The PPX as it is now is very simple so you can do things like:
Ppx can only be good and reliable if it’s simple. So I’m avoiding any additional magic. There’s enough of it already! |
I wonder how we can allow customization on a per library basis. Imagine something like packages being able to append to an environment variable (like a colon separated PATH) except each segment informs refmterr about how to special case errors. What would you want this error to be formatted as? |
@jordwalke Instead of this:
I'd like to match ^ that and output an error saying something along these lines:
|
There's a Revery/brisk-reconciler specific error that's not obvious, it's when you use
let%component
but don't use hooks inside the component. You get:It'd be great to special case it and explain the root of the cause in human language.
The text was updated successfully, but these errors were encountered: