-
-
Couldn't load subscription status.
- Fork 8.9k
Closed
Description
What problem does this feature solve?
I would like to extend RefImpl to create a Ref which can hold more state.
Currently I would have to use customRef because I can't create a valid Ref object by myself without knowing RefSymbol, which is not exported either.
// Use the provided getters/setters
class MyRef<T> extends RefImpl<T>{
get value(){
//... do stuff
return super.value;
}
//...
}
// Override the tracking
class MyRef2<T> extends RefImpl<T>{
get value(){
track(toRaw(this), "get" /* GET */, 'value');
//... do stuff
return this._value;
}
//...
}What does the proposed API look like?
Just export the class and maybe look into setting properties as private or protected.
Metadata
Metadata
Assignees
Labels
No labels