JM Santos
Aug 22, 2022

--

Thanks for sharing! Just for my knowledge, why do you need to assign the value on a new variable - Consumer?

I think we can do:

```

const Component = selectedStrategy(userData.status);

```

And if we need some extra performance gains, we can probably add a useMemo().

--

--

JM Santos
JM Santos

Responses (1)