-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Been looking for something like react-svgmt -- it's very well conceived. Just having one issue with it.
I want to load an SVG, hide parts of it, and then progressively reveal them. This works, but I'm getting an initial render that shows the entire SVG before the proxies step in and hide the dom IDs that I want to be initially hidden. Is there some way I can avoid this initial flash showing the wrong state?
const SvgAppear = ({path, steps, step, ...props}) => {
const children = steps.split(/,\s*/)
const step = useSteps(children.length)
return <SvgLoader path={path}>
{
children.map((layer, i) =>
<SvgProxy key={i} selector={layer} opacity={i < step ? '1' : '0'} />
)
}
</SvgLoader>
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels