akxcv/vuera

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

thany opened this issue · 0 comments

thany commented

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?