-
Notifications
You must be signed in to change notification settings - Fork 38
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
ReactComponent: remove string refs api and deprecate context #108
ReactComponent: remove string refs api and deprecate context #108
Conversation
**/ | ||
var refs(default, null):TRefs; | ||
@:deprecated | ||
var context(default, null):Dynamic; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe instead of @:deprecated
we keep them behind -D react_comp_legacy
.
Also maybe -D react_deprecated_api
is a better name :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure :)
As for the define name, I agree that it sucks. react_deprecated_api
is not really future proof, though. Maybe two different defines, like react_deprecated_refs
and react_deprecated_context
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went ahead and did it, feel free to request a define name change if that doesn't suit you.
a34e210
to
8bacd11
Compare
Ok I'm fine with the PR. I wonder if I merge now and we'll get that into a major version update. Though we'd want to have the hxx upgrade as well I suppose before releasing. |
I guess you can keep this PR around until hxx is ready for a major release. |
Note: I need to update |
051db8d
to
ea365dd
Compare
The
refs
API as used withReactComponentOf<TProps, TState, TRefs>
(and other react component typedefs withTRefs
) has been deprecated for a while in react.I am not sure anyone is using it with haxe-react at the moment, but it shouldn't be used any more. However, this may break components using directly
ReactComponentOf<TProps, TState, TRefs>
instead ofReactComponent
andReactComponentOfX
typedefs. The fix is simple but has to be made for the applications to compile.ReactComponentOfPropsAndState<TProps, TState>
has been removed since it has become redundant withReactComponentOf<TProps, TState>
.However,
ReactComponentOfPropsAndState
is widely used so it can be enabled for now with-D react_comp_legacy
.Somehow deprecating
ReactComponentOfPropsAndState
wouldn't work so I had to remove it and add this define.This PR also deprecates
context
(see #104).