Can't find variable when using subcomponent #1876
Unanswered
joostvanhoof
asked this question in
1. Help
Replies: 2 comments 14 replies
-
What's rendered to the markup inside |
Beta Was this translation helpful? Give feedback.
8 replies
-
@joostvanhoof did you manage to sort this out? |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was in doubt whether this should go under Livewire or AlpineJS, but I think it's the latter.
My setup is like this:
In a blade view
example.blade.php
somewhere in the galaxy:If I do the same
x-show
in the componentdashboard.test
that was included above:the functionality of
x-show
actually works, but I do get aUnhandled Promise Rejection: ReferenceError: Can't find variable: postActiveId1
The
example.blade.php
is a Livewire component so maybe that has to do with it. I tried addingwire:key="{{ $post->id }}"
to the div in thedashboard.test
component but that didn't resolve it.Beta Was this translation helpful? Give feedback.
All reactions