From fe18830ce6e7f3fd9a85abf03e5eef4322f05b73 Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Sat, 7 Jan 2017 18:03:49 -0800 Subject: [PATCH] [change] use classList in UIManager Prevent setting the same class multiple times --- src/apis/UIManager/index.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/apis/UIManager/index.js b/src/apis/UIManager/index.js index 70e28d86..78e82bc5 100644 --- a/src/apis/UIManager/index.js +++ b/src/apis/UIManager/index.js @@ -53,10 +53,7 @@ const UIManager = { } case 'class': case 'className': { - const nativeProp = 'class'; - // prevent class names managed by React Native from being replaced - const className = `${node.getAttribute(nativeProp)} ${value}`; - node.setAttribute(nativeProp, className); + node.classList.add(value); break; } case 'text':