yW
const withF: Wrapper<InjectedProps> = (Wrapped) => (props) => <Wrapped {…props} />Size: a a a
yW
const withF: Wrapper<InjectedProps> = (Wrapped) => (props) => <Wrapped {…props} />yW
PН
const withF: Wrapper<InjectedProps> = (Wrapped) => (props) => <Wrapped {…props} />type Wrapper<T> = (WrappedComponent: React.ComponentType<{}>) => React.ComponentType<T>
Это о другом?yW
ПЗ
function User(props) => {
return (
<div className="user">
<image className="user__avatar src={props.avatar} />
</div>
)'
}
const UserWithProfileLink = extend(User, props => {
block('user')({
apendContent: { block: 'link', href: '/profile', content: 'Профиль' }
})
});EA
RY
EA
RY
EA
EM
EA
yW
function User(props) => {
return (
<div className="user">
<image className="user__avatar src={props.avatar} />
</div>
)'
}
const UserWithProfileLink = extend(User, props => {
block('user')({
apendContent: { block: 'link', href: '/profile', content: 'Профиль' }
})
});yW
yW
yW
<UserContainer>
<UserAvatar />
{addonAfter}
</UserContainer>
ПЗ
AS
<div class="block">
<div class="block block__elem"></div>
</div>
SB
<div class="block">
<div class="block block__elem"></div>
</div>
AS