#how to use forwardRef with inject?

4 messages · Page 1 of 1 (latest)

smoky shard
#
class FooService {
 option1 = forwardRef(() => inject(Token))
 option2 = inject(forwardRef(() => Token))

option 1 or 2?

verbal cedar
#

neither

#

there's no need to use forward ref there

#

forward ref is to prevent usage before a variable is defined