Closed ralfstory closed 2 years ago
@ralfstory would you also please include isIniatlized
in the type definition (index.d.ts
) and update the readme?
I rebased your changes and squashed them while I was at it. I dropped the changes to package-lock.json
since there were conflicts and they didn't seem relevant to the change at hand. I'll merge this now, thanks for the change!
@luser thanks for getting to this!! no longer needed it for what I was working on, so it was easy to fall through - still a helpful addition in any case!
This PR adds an
isInitialized
function which wrapswindow._fs_initialized
. This is useful for code that could potentially repeatedly callinit
(like useEffects), leading to noisy console warnings. Checking for initialization before callinginit
would be helpful in this situation.