TS
Не много отстал от Реакта и хочу спросить. Что сейчас используете для стейт менеджмента?
Слышал редакс отходит потихонечку
Size: a a a
TS
VS
KY
AR
SG
KY
AR
AR
AR
O
LH
AL
class App extends React.Component {
render () {
return (
<Provider>
<Router>
<Switch>
<Route exact path="/tools/meals/account" component={AccountPage} {...this.props}/>
<Route path="/tools/meals/plans" component={Plans}/>
</Switch>
</Router>
</Provider>
);
}
}
class Account extends React.Component {
render () {
return(
<div className="container">
<div className="section section__text-block">
<div className="row">
<div className="col-xs-12 col-sm-5 col-lg-5">
<h1>Hello, Nicolas.</h1>
</div>
</div>
</div>
<div className="section">
<div className="row psr">
<div className="col-xs-12 col-sm-4 col-lg-4 psr zi-5">
<AccountDetailsMenu/>
</div>
<Route path='/tools/meals/plans' component={AccountBillingInfo} {...this.props}/>
<Route path='/tools/meals/account/orders' component={AccountOrders} {...this.props}/>
{/*<Route path='/tools/meals/account/orders'/>*/}
{/*<Route path='/tools/meals/account/email'/>*/}
<div className="img-decor img-decor-01 img-decor-01--5">
<img src="https://cdn2.shopify.com/s/files/1/0084/4457/5821/files/img-decor-01.svg?19889" alt="image description" />
</div>
<div className="img-decor img-decor-07 img-decor-07--4">
<img src="https://cdn2.shopify.com/s/files/1/0084/4457/5821/files/img-decor-07.svg?19889" alt="image description" />
</div>
</div>
</div>
</div>
)
}
}
```lass AccountDetailsMenu extends React.Component {
render() {
return (
<nav>
<ul id="sub-menu">
<AccountDetailsMenuLink {...this.props} linkTo="/tools/meals/account" linkTitle="Home"/>
<AccountDetailsMenuLink {...this.props} linkTo="/tools/meals/account/settings" linkTitle="Account settings"/>
<AccountDetailsMenuLink {...this.props} linkTo="/tools/meals/account/billing" linkTitle="Billing info"/>
<AccountDetailsMenuLink {...this.props} linkTo="/tools/meals/account/orders" linkTitle="Order history"/>
<AccountDetailsMenuLink {...this.props} linkTo="/tools/meals/account/email" linkTitle="Email notifications"/>
</ul>
</nav>
)
}
}
SS
VS
Y
Y
AL
SS
IP
AL