react-twitter-embed
react-twitter-embed copied to clipboard
Passing theme as a prop does not make component update.
When passing theme as a prop. The component does not re-render.
For example, passing isDark as theme={isDark ? "dark" : "light"} does not work.
Please see the codesandbox link to see the issue: https://codesandbox.io/s/unruffled-bartik-lo92h
Here is a quick hack for anyone:
Pass key prop manually,
<TwitterTimelineEmbed
sourceType="profile"
theme={isDark ? "dark":"light"}
key={isDark ? "1":"2"}
/>