Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Props in React Component #65

Closed
myagizmaktav opened this issue May 31, 2023 · 1 comment
Closed

Props in React Component #65

myagizmaktav opened this issue May 31, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@myagizmaktav
Copy link

Describe the bug
When writing code in React, I often need to transfer props to the parent component. However, I sometimes forget which props need to be omitted when passing them to the parent component.

Expected behavior
I expect to have a clear and convenient way of determining which props should be omitted when passing them to the parent component.

LanguagePicker.tsx

type languagePickerProps = {
  pickerProps?: DropDownPickerProps<Object>;

  // Omit<
  //   DropDownPickerProps<Object>,
  //   "multiple" | "setValue" | "value" | "items" | "open" | "setOpen"
  // >;
};

export const LanguagePicker = (props: languagePickerProps) => {
  // Component logic here
};


Footer.tsx

<LanguagePicker
  pickerProps={{
    style: {
      backgroundColor: "red",
    },
  }}
/>

Screenshots

Props needs to be shown in code format I think.

Please provide more context or additional information if necessary to help identify and resolve the issue.

@myagizmaktav myagizmaktav added the bug Something isn't working label May 31, 2023
@yoavbls
Copy link
Owner

yoavbls commented Sep 18, 2023

Fixed in 0.5.2 🙂

@yoavbls yoavbls closed this as completed Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants