Skip to content

Instantly share code, notes, and snippets.

View wojciech-bilicki's full-sized avatar

Wojciech Bilicki wojciech-bilicki

  • Oke Software
  • Gdańsk
View GitHub Profile
@wojciech-bilicki
wojciech-bilicki / esnextbin.md
Last active August 13, 2016 11:16
esnextbin sketch
@wojciech-bilicki
wojciech-bilicki / index.html
Last active July 23, 2017 13:14
Index.html after adding first scripts
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Marvel</title>
</head>
<body>
<div id="app"></div>
@wojciech-bilicki
wojciech-bilicki / index.js
Created July 23, 2017 13:53
#2 Index.js with props
var topBarTitle = function(props) {
return React.createElement('p', { style: props.style }, props.title);
};
var topBar = function() {
return React.createElement(
'div',
{ style: { color: 'red' } },
React.createElement(topBarTitle, {
title: 'SpiderMan Hero',
@wojciech-bilicki
wojciech-bilicki / .babelrc
Last active July 26, 2017 16:56
Babel Settings for workshop #1
{
"extends": ["airbnb", "prettier", "prettier/react"],
"plugins": ["prettier"],
"parserOptions": {
"ecmaVersion": 2016,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
@wojciech-bilicki
wojciech-bilicki / index.html
Created July 28, 2017 16:28
Index.html with attached bundle
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Marvel</title>
</head>
<body>
<div id="app"></div>
{
"presets": [
"react",
[
"env",
{
"targets": {
"browsers": "last 2 versions"
},
"loose": true,
const path = require('path');
module.exports = {
context: __dirname,
entry: './js/App.js',
devtool: 'source-map',
output: {
path: path.join(__dirname, 'public'),
filename: 'bundle.js'
},
@wojciech-bilicki
wojciech-bilicki / App.jsx
Last active August 1, 2017 15:33
App.jsx #3
import React from 'react';
const App = () => <div>Super Hero Team</div>;
ReactDOM.render(React.createElement(App), document.getElementById('app'));
@wojciech-bilicki
wojciech-bilicki / App.jsx
Created August 1, 2017 15:36
App.jsx #4
import React from 'react';
import ReactDOM from 'react-dom';
const App = () =>
<div>
<header>Super Hero Team!!!</header>
<div>Content</div>
</div>;
ReactDOM.render(React.createElement(App), document.getElementById('app'));
@wojciech-bilicki
wojciech-bilicki / TopBar.jsx
Created August 2, 2017 15:33
TopBar.jsx #3
import React from 'react';
const TopBar = () =>
<header>
<span>Super Hero Team</span>
</header>;
export default TopBar;