We are nesting our TextTicker component within a parent component that has a width that can change (e.g. a button may appear next to it shortening the width). When this happens, as the width isn't passed to the TextTicker component, it isn't rerendering. This causes an issue in the case when the width of the container goes from long enough to fit, to shorter than the text (and thus require scrolling). We could pass the width as a child (and not display it) but this feels like a hack. It isn't accepted by any of the props on the component.
We are nesting our
TextTicker
component within a parent component that has a width that can change (e.g. a button may appear next to it shortening the width). When this happens, as the width isn't passed to theTextTicker
component, it isn't rerendering. This causes an issue in the case when the width of the container goes from long enough to fit, to shorter than the text (and thus require scrolling). We could pass the width as a child (and not display it) but this feels like a hack. It isn't accepted by any of the props on the component.