Help us help you! Have you looked for similar issues? Do you have reproduction steps? Contributing Guide
<%= react_component "MyComponent", {prop_a: 1}, {data: {"turbolinks-permanent": true}} %> <!-- Renders correctly -->
<%= react_component "MyOtherComponent", {prop_b: 2} %> <!-- Renders "MyComponent" with "prop_a" instead of "MyOtherComponent" with "prop_b" -->
(Guidelines for creating a bug report are available
here)
Tell us what should happen
The later call to render MyOtherComponent should render MyOtherComponent and not MyComponent.
Tell us what happens instead
Because the react-cache-id data attribute is not specified but turbolinks-permanent is set to true the component is cached under the key undefined. So any other components that are rendered after that component which also has react-cache-id undefined will instead use the incorrectly cached component, regardless of turbolinks-permanent being defined or not
Sprockets or Webpacker version: Sprockets 3.7.2, Webpacker 4.0.7
React-Rails version: 2.6.0
Rect_UJS version: Unknown
Rails version: 5.2.3
Ruby version:2.3.8p459
I can take a stab at it.
Most helpful comment
I can take a stab at it.