Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Commit

Permalink
Move createSubatomic outside of returned component to prevent childre…
Browse files Browse the repository at this point in the history
…n from always re-rendering
  • Loading branch information
gragland committed May 31, 2018
1 parent 9867811 commit 684e58e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/emotion.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import emotionIsPropValid from '@emotion/is-prop-valid';
import blacklistedAttributes from './blacklisted-attributes.js';

export default tag => {
const Subatomic = createSubatomic(tag);
return props => {
const Subatomic = createSubatomic(tag);
return React.createElement(Subatomic, props);
};
};
Expand Down

0 comments on commit 684e58e

Please sign in to comment.