How to detect react concurrent mode?

248 Views Asked by At

How to detect that the current used React (stable/release) version in an application supports concurrent mode ? Let's say you are authoring a library that should target several react versions, and only add concurrent features if they are relevant.

I'm doing a return typeof React.useTransition === "function" but I am hesitant about it.

Thanks in advance.

0

There are 0 best solutions below