svg2rn icon indicating copy to clipboard operation
svg2rn copied to clipboard

Custom svg template

Open ferndot opened this issue 6 years ago • 2 comments

It would be nice to make the SVG component template configurable. For instance, I would like to use a class component instead of the default function component. Or, some people might have special code style requirements.

ferndot avatar Apr 15 '19 04:04 ferndot

In my opinion, this does not carry a functional load. Describe a situation where you might need a class component than a function. After the component is created, it is formatted by prettier in standard syntax. If a person needs to format a project, I think he can use the right tool.

khorark avatar Apr 15 '19 11:04 khorark

In my case, I am using Animated with the component. Functional components cannot use refs, so they also cannot be used directly with Animated.

I do agree that a functional component makes the most sense for this. That is why I suggested that it be configurable, not replaced with a class component.

ferndot avatar Apr 15 '19 14:04 ferndot