According to the official React docs on useState,
If the initial state [to be passed to useState] is the result of an expensive computation, you may provide