Skip to content

React patterns#3

Open
SuhareevAI wants to merge 2 commits intodashanalivayko:mainfrom
SuhareevAI:main
Open

React patterns#3
SuhareevAI wants to merge 2 commits intodashanalivayko:mainfrom
SuhareevAI:main

Conversation

@SuhareevAI
Copy link

No description provided.

const text = <p style={{ marginRight: '5px' }}>нажми меня!</p>;
export const ButtonWithLabel : FC<ButtonWithLabelProps> = (props) => {
const {label, ...restProps} = props;
return (

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export const ButtonWithLabel : FC = ( {label, ...restProps}: ButtonWithLabelProps) => {
В паттерне о этой говорится)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Внес правки

@@ -0,0 +1,6 @@
export interface ButtonWithLabelProps
{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export interface ButtonWithLabelProps {
onClick: () => void,
children: string,
label: string
} скобки не нужно опускать)))

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Внес правки


export const MemberCard: FC<UserProps> = ({ name, username, phone, website }) => {
export const MemberCard: FC<UserProps> = (props) => {
const {name, ...restProps} = props;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Описал выше

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Поправьте по всем проекту

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Внес правки

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

Successfully merging this pull request may close these issues.

2 participants