sagaGetUsers.next()
describe('users sagas', () => {
test('look on a default offset users at list', () => {
const sagaGetUsers = getQueryUserSaga()
const payload = 'default_filter=none'
expect(sagaGetUsers.next(payload).value).toEqual(take(GET_QUERY_USERS_REQUEST))
expect(sagaGetUsers.next().value).toEqual(select(filtersSelector))
})
})
state = {array : []}
)const newArray = this.state.array
newArray.push('test')
this.setState({array : newArray})
componentDidMount() {
if (!selectRoot) {
const newNode = document.createElement('div')
newNode.setAttribute('id', 'select-root')
const rootNode = document.querySelector('#root')
rootNode.after(newNode)
newNode.appendChild(this.el)
} else {
selectRoot.appendChild(this.el)
}
}
const colors = [#000, #333, #555 , #etc...]
class BackgroundSwitcher extends React.Component {
render() {
return (
<>
{colors.map(color => <Hero background={color} />)}
</>
);
}
}
const Hero = (props) => <div className="hero" style={{background: props.background}}>
<img src="images/heroes/flash.jpg"/>
<div className="hero-desc">
<h1>Flash</a>
<h3>Three men have held the title of "The Fastest Man Alive" -- Jay Garrick, Barry Allen, and Wally West -- each of them redefined the word "hero."</a>
</div>
</div>
import {Login, LoginWrap, DataInput} from '../styledComponents/login.js'
return(
<LoginWrap>
<Login>
<img src={logo} alt='logo'/>
<h3>Login</h3>
<DataInput>
<input placeholder='Login' ref={loginInput}/>
<input placeholder='Password' type='password' ref={passInput}/>
</DataInput>
<span>{loginError}  </span>
<input type='submit' value='Login' onClick={onLogin}/>
</Login>
</LoginWrap>
)
<Switch>
<Redirect
from={"/first"}
exact
to={"/first/item1"}
render={() => <Item {...props}/>}
/>
<Route
path={"/first/item1"}
render={() => <Item {...props}/>}
/>
<Route
path={ '/first/item2'}
render={() => <List {...props}/>}
/>
</Switch>
selector{
display: flex;
align-items: left;
max-width: 40px;
overflow-x: hidden;
white-space: nowrap;
}
text-overflow: ellipsis;