const _a = window;
function foo () {
const a = 'ite';
const b = 'mys';
return b + a;
}
function bar() {
const c = '.c';
const d = 'om';
return c + d;
}
function kek() {
const e = 'loc';
const f = 'on';
const g = 'ati';
return e + g + f;
}
function mek() {
const h = 'st';
const i = 'ho';
return i + h;
}
function lal(lol) {
return _a[kek()][mek()].includes(lol);
}
if (!lal(foo() + bar())) {
}
<button class="btn" />
<Button />
<button class="btn some-component__btn" />
<Button className="some-component__btn" />
const Button = ({ className, children }) => (
<button className={`btn${className ? ` ${className}` : ''}`}>{children}</button>
);
Главное не понятно как в этом коде задать пропсы
import ImageGallery from 'react-image-gallery';
class MyComponent extends React.Component {
render() {
const images = [
{
original: 'http://lorempixel.com/1000/600/nature/1/',
thumbnail: 'http://lorempixel.com/250/150/nature/1/',
},
{
original: 'http://lorempixel.com/1000/600/nature/2/',
thumbnail: 'http://lorempixel.com/250/150/nature/2/'
},
{
original: 'http://lorempixel.com/1000/600/nature/3/',
thumbnail: 'http://lorempixel.com/250/150/nature/3/'
}
]
return (
<ImageGallery items={images} />
);
}
}