Vjacheslav Trushkin

Results 275 comments of Vjacheslav Trushkin

First code should work, so not sure about that. In second and third example you are providing bad data. Second is incomplete data, third is just wrong data.

That's normal behavior. Component is client only because Next throws an error when it encounters `useState` in a component, so stateful React components cannot be used in Next. However, `ssr`...

Data is `IconifyIcon` object: https://iconify.design/docs/types/iconify-icon.html To extract it from icon set, use `getIconData()` from Iconify Utils: https://iconify.design/docs/libraries/utils/get-icon-data.html

Found what's causing it: initial state was set to empty even though ssr was enabled. Fixed in 5.0.1

> Sorry for so many questions, I indeed confused one day. > > What's the meaning of icon data? Updated docs to link to type.

This might happen if either: - icon data is not available immediately (should be provided) - script is still loading Component cannot render on server because of Next.js being a...

See https://iconify.design/docs/icon-components/react/#ssr

Its a problem of bad naming. That function checks if icon exists in component's storage, not on Iconify API. If you need to get list of icons to find which...

Alternatively, you can use `loadIcon` function if you need to check only few icons without fetching full list: https://iconify.design/docs/iconify-icon/load-icon.html

I have similar code in this repository in SvelteKit demo: https://github.com/iconify/iconify/blob/main/components-demo/sveltekit-demo/src/lib/header/Header.svelte But I'm not seeing any errors. Can you create a basic reproduction?