You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notice: A bug is a crash or incorrect behavior. If you have a debugging or troubleshooting question, please open a discussion on the Discussions Tab. Otherwise, remove this line and fill out the following sections.
Hello there,
I'm having an issue regarding shakapacker and view_components. I'm filling a bug report here, because I assume the issue is on shakapacker's side. Please correct me if I'm wrong.
The problem I am experiencing, is that it is currently not possible to append javascript pack tag from within a view component.
Testing this out and prying in the view and footer component I can see that while both have access to javascript_pack_tag_queue for example, the one in view component is a different instance so it stores state local to that component.
This is different to plain rendering view or partial where same ActionView base will be reused so the state is global.
Not too familiar with view components rendering but can't see an easy way we could fix it on our end
Notice: A bug is a crash or incorrect behavior. If you have a debugging or troubleshooting question, please open a discussion on the Discussions Tab. Otherwise, remove this line and fill out the following sections.
Hello there,
I'm having an issue regarding shakapacker and view_components. I'm filling a bug report here, because I assume the issue is on shakapacker's side. Please correct me if I'm wrong.
The problem I am experiencing, is that it is currently not possible to append javascript pack tag from within a view component.
Expected behavior:
Hello should be displayed in the console
Actual behavior:
Hello is not displayed in the console
Small, reproducible repo:
app/views/layouts/application.html.erb
app/components/footer_component.html.erb
app/components/footer_component.rb
app/javascript/packs/cookie_banner.js
Setup environment:
The text was updated successfully, but these errors were encountered: