Open MuhammadHasham23 opened 4 years ago
When passing theme as a prop. The component does not re-render.
theme
For example, passing isDark as theme={isDark ? "dark" : "light"} does not work.
isDark
theme={isDark ? "dark" : "light"}
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"} />
When passing
theme
as a prop. The component does not re-render.For example, passing
isDark
astheme={isDark ? "dark" : "light"}
does not work.Please see the codesandbox link to see the issue: https://codesandbox.io/s/unruffled-bartik-lo92h