Skip to content

Commit

Permalink
Remove ReactMutableRef
Browse files Browse the repository at this point in the history
  • Loading branch information
terurou committed Nov 22, 2023
1 parent f8246e0 commit f421293
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/lib/react/React.hx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ extern class React {
If you are using an earlier release of React, use callback refs instead
https://reactjs.org/docs/refs-and-the-dom.html#callback-refs
**/
static function createRef<T>():ReactMutableRef<T>;
static function createRef<T>():ReactRef<T>;

/**
https://react.dev/reference/react/forwardRef
Expand Down
10 changes: 0 additions & 10 deletions src/lib/react/ReactMutableRef.hx

This file was deleted.

6 changes: 2 additions & 4 deletions src/lib/react/ReactRef.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
package react;

abstract ReactRef<T>({current:T}) {
public var current(get, never):T;
inline extern function get_current() return this.current;
}
@:forward
abstract ReactRef<T>({current:T}) { }

0 comments on commit f421293

Please sign in to comment.