snappify icon indicating copy to clipboard operation
snappify copied to clipboard

Add FunctionComponent matcher

Open krnlde opened this issue 4 years ago • 3 comments

I'd like to use snappify in a hook-based environment where FunctionComponents are key. Unfortunately there is yet no matcher for those. I propose change to also catch FunctionComponents.

TBD: Should SFCs also be supported?

krnlde avatar Dec 03 '19 11:12 krnlde

Hi @krnlde!

Thank you for the PR! Yes, I think it's a great idea to add matchers for FunctionComponent, SFC and even FC. It would be great if you could also add matchers for SFC and FC and some tests to cover the new matchers to this PR (you can find the tests in __tests__/componentReader). I would be happy to merge these changes!

denisraslov avatar Dec 04 '19 15:12 denisraslov

Nice :) Will do!

krnlde avatar Dec 04 '19 15:12 krnlde

I added SFC and FC but tbh I don't understand how to write your componentReader tests :D any support on this? Create new files or extend existing ones?

krnlde avatar Mar 06 '20 14:03 krnlde