Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

React component (in Vue app) is receiving a fragment prop #162

Open
thany opened this issue Dec 1, 2022 · 0 comments
Open

React component (in Vue app) is receiving a fragment prop #162

thany opened this issue Dec 1, 2022 · 0 comments

Comments

@thany
Copy link

thany commented Dec 1, 2022

Why is this being done?

In Vue:

<template>
  <fragment>
    <p>Hello from Vue</p>

    <hello-from-react foo="bar" />
  </fragment>
</template>

In React:

interface Props {
  foo: string;
}

const HelloFromReact = (props: Props) => {
  console.log(props); //<-- This proves the passing of a `fragment` prop that is unexpected; `foo` is also there which is okay.
  return <p>Hello from React typescript</p>;
};

export default HelloFromReact;

This will break strict props validation that we will be adding in the future. Can vuera please ONLY pass props that are being specified in the template that calls the React component?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant