react-css-theme-switcher icon indicating copy to clipboard operation
react-css-theme-switcher copied to clipboard

the page starts without any styling, how can I change it?

Open devEzequiel opened this issue 3 years ago • 1 comments

when I enter the app it shows a page without formatting for a short period, is there a solution for that?

devEzequiel avatar Aug 26 '21 12:08 devEzequiel

Already covered in Readme. Usage -> Use useThemeSwitcher Hook: if (status === 'loading') { return <div>Loading styles...</div>; }

But this status check causes rendering components twice. I was able to fix it like this: if (status !== 'loaded') { return <div>Loading styles...</div>; } Hope it helps :)

gungorerhan avatar Sep 01 '21 16:09 gungorerhan