Skip to content

React patterns#3

Open
SuhareevAI wants to merge 2 commits into
dashanalivayko:mainfrom
SuhareevAI:main
Open

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

Conversation

@SuhareevAI
Copy link
Copy Markdown

No description provided.

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

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
Copy Markdown
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
{
Copy link
Copy Markdown

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
Copy Markdown
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;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Описал выше

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
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