Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Inline React
<script src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
<script>
const e = React.createElement;
function SliderImage() {
return e('div', { className: 'tSlider--image-wrapper' }, e('img', { src: '//cdn.shopify.com/s/files/1/0116/9562/0160/t/3/assets/bg.png?7092974999273233205', className: 'tSlider--image' }));
};
function Text() {
return e(
'div',
{ className: 'tSlider--sliderText' },
e('h1', { className: 'tSlider--headline' }, 'Fun stuff'),
e(
'span',
{ className: 'tSlider--subHeadline' },
'This is a React example without any transpiling ',
e('b', null, 'with a bold text'),
'. ❤️'
)
);
};
function TeduschSlider() {
return e(
'div',
{ className: 'tSlider' },
e(SliderImage),
e(Text)
);
}
const domContainer = document.getElementById('slider');
ReactDOM.render(e(TeduschSlider), domContainer);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment