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

Layout Page appMenu prop type problem #9

Open
jgradzki opened this issue Aug 26, 2021 · 13 comments
Open

Layout Page appMenu prop type problem #9

jgradzki opened this issue Aug 26, 2021 · 13 comments

Comments

@jgradzki
Copy link

Hi,

I have encountered problem with Page component appMenu prop type.

Definition is:

type LayoutProps = {
navBar?: React.ReactNode;
appMenu?: React.Component;
children: JSX.Element;
};

but even when using Page component same as in examples from storybook

<Page appMenu={<LayoutAppMenu />} navBar={<LayoutNavbar />}>

typescript is throwing types error:

TS2740: Type 'Element' is missing the following properties from type 'Component<{}, {}, any>': context, setState, forceUpdate, render, and 2 more. 

Page.d.ts(4, 5): The expected type comes from property 'appMenu' which is declared here on type 'IntrinsicAttributes & LayoutProps & { children?: ReactNode; }'

There is no problem with navBar prop. When overwriting type definition for appMenu to be same as navBar which is React.ReactNode (instead of React.Component) components renders properly.

Problem occurs when using React in version 17 as well as in version 16.

I can make PR to change appMenu type to React.ReactNode, unless I'm missing something and this is not a problem with prop definition?

@rootsher
Copy link

@ofsajd ☝️

@ccrvlh
Copy link

ccrvlh commented Dec 14, 2021

Same here

@ccrvlh
Copy link

ccrvlh commented Feb 12, 2022

Hi guys. We are considering whether to fork the lib to make a few adjustments or the make pull requests. Was wondering what are the plans, and whether you guys would accept simple/bug fixes pull requests. We want to use it in production, but there are some things that we would have to fix in order to make this our primary lib. Thanks!

@rootsher
Copy link

@lowercase00 #6 :)

@ccrvlh
Copy link

ccrvlh commented Feb 12, 2022

@rootsher yep, saw that. How are you guys approaching the issue? Did you fork the platform?

@rootsher
Copy link

@lowercase00 We used Chakra UI (https://chakra-ui.com). We are very satisfied. Adding even more complex components (which are in Synerise Design) was not difficult and development is now a pleasure.

@ccrvlh
Copy link

ccrvlh commented Feb 12, 2022

@rootsher we like Chakra a lot, but we are a two-men team and Chakra demanded a whole bunch of customization. We currently have been using Ant, but really liked the features and UI of Synerise. Tough decision since this is not very active.

@kbalus
Copy link

kbalus commented Feb 12, 2022

hi guys, on a couple days we will sent you some information about when we exactly migrate our repository. Then we will open Design System for your cooperation. Next step is updating react and react-dom into v17 ;)

@ccrvlh
Copy link

ccrvlh commented Feb 18, 2022

@kbalus awesome, thanks a lot! please let us know, we are close to adopting Synerise in our project, and would be more than happy to contribute. If possible, would be great if you guys could include some guidance on how to contribute as well.

@ccrvlh
Copy link

ccrvlh commented Feb 22, 2022

hey @kbalus ! Any updates on the updated repo?
also, was wondering if you guys have any plans to update ant's version. 4.7.0 was released late 2020 and there are some compatibility issues. We also use some raw Ant components, so we would be happy to help to update ant's version as well. let me know. Cheers

@ccrvlh
Copy link

ccrvlh commented Feb 23, 2022

PR

@productdevbook
Copy link

hi guys, on a couple days we will sent you some information about when we exactly migrate our repository. Then we will open Design System for your cooperation. Next step is updating react and react-dom into v17 ;)

@kbalus react 18 is out :)

@dumblob
Copy link

dumblob commented Jun 30, 2022

I also wonder how to go about this - forking or trying to push patches upstream? What would you prefer @ofsajd ?

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

No branches or pull requests

6 participants