From b359f82b4e62ada03965518c148ccbc02cd453ab Mon Sep 17 00:00:00 2001 From: Mark Lawlor Date: Wed, 10 Aug 2022 16:13:09 -0300 Subject: [PATCH] refactor: add comment on jsx spread attributes --- packages/nativewind/src/babel/utils/has-attribute.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/nativewind/src/babel/utils/has-attribute.ts b/packages/nativewind/src/babel/utils/has-attribute.ts index 7803848..ee9a654 100644 --- a/packages/nativewind/src/babel/utils/has-attribute.ts +++ b/packages/nativewind/src/babel/utils/has-attribute.ts @@ -12,7 +12,12 @@ export function someAttributes( const openingElement = path.node.openingElement; return openingElement.attributes.some((attribute) => { - // Ignore spreads, we cannot process them + /** + * I think we should be able to process spread attributes + * by checking their binding, but I still learning how this works + * + * If your reading this and understand Babel bindings please send a PR + */ if (isJSXSpreadAttribute(attribute)) { return false; }