props seem not to be received property by child components [ VUE 3 + <script setup> ] #10073
Replies: 5 comments 6 replies
-
u see "window-sroll" because of typing error |
Beta Was this translation helpful? Give feedback.
-
Very unlucky typo, thank you very much... (CORRECTED IT) |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
It seems you have some fundamental misconceptions about props, maybe? definitively!! I solved my problems by switching to provide/inject. But im still curios why that doesnt work. When you say This is a prop of this component, so do not apply it to the component's root element as an HTML Attribute. I will handle this value myself in the script i think you assume that i am expecting window-scroll to be handled as a regular HTML Attribute for the root-Element of TheAbout
but that is NOT the case, because this prop´s only purpose is to be used internally within the Component as a whole itself. Did i interpret your sentece right? |
Beta Was this translation helpful? Give feedback.
-
Yes, most likely |
Beta Was this translation helpful? Give feedback.
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 have a parentComponent
AllSections
that has 4 custom Components as children:TheHeader
TheAbout
TheWork
TheStack
As you can see here....
AllSections:
...every of its children gets the current Scrollposition as a prop. My issue is regarding the
TheAbout
- component:As you can see,
TheAbout
has two components as children that also get the received prop.Now here is a screenshot of those elements and you will see, that ONLY the KeywordWrapper actually has gotten that prop:
Neither
TheAbout
itself norTheAbout
´s other childTextwrapperAbout
has it. How and why is it that one out of 6 components only actualy gets the prop? I researched a lot on the internet and didnt find a single case where someone had this problem.I am facing some issues regarding animations that might have there problems caused by the missing props so i hope this will bring me clarity
Beta Was this translation helpful? Give feedback.
All reactions