DEV Community

kirankumar
kirankumar

Posted on

3 3

New React API proposal

For SVG icons currently, we are preferring like functional components like this

const SvgIcon = () => (
SVG icon tag...
);

here I am not taking any props for the functional component but if any updates happened parent component child component(SvgIcon) which is an SVG icon is rerendering.
Here we can use memo but the React memo is not preferable for small components like this as a component should have memoizable content (props) or complex computations.

In SVG icon we can imagine any static text () or image the same happens.

So here I am proposing like better if we anyone API (naming convention can be anything) in internal it can be wrapped with memo or else any other but it should be rendered only once

any suggestion, queries.

Thanks to all

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

AWS GenAI LIVE!

GenAI LIVE! is a dynamic live-streamed show exploring how AWS and our partners are helping organizations unlock real value with generative AI.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️