Есть родительский класс и есть дочерний класс.
entry: 'entry.js',
output: {
filename: 'bundle.js',
library: 'App'
},
function initMap() {
var e = {
lat: 40.714909,
lng: -73.751213
}
, t = new google.maps.Map(document.getElementById("map"), {
zoom: 16,
center: e
});
new google.maps.Marker({
position: e,
map: t
})
}
export {
initMap,
};
callback=App.initMap
<script type="text/javascript" src="./js/bundle.js"></script>
<script>
//Google Maps init
function initMap() {
var e = {
lat: 40.714909,
lng: -73.751213
}
, t = new google.maps.Map(document.getElementById("map"), {
zoom: 16,
center: e
});
new google.maps.Marker({
position: e,
map: t
})
}
</script>
<script type="text/javascript" async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDgD9raCgCP3YPNgS7DZyoB8t-Q8wCuaRY&callback=initMap"></script>
const VK = window.VK;
/*eslint-disable */
VK.Api.call({
/* ... */
});
/*eslint-enable */
.btn {
background-image: url(../img/btn.png);
background-position: 0 0;
width: 478px;
height: 152px;
display: inline-block;
position: absolute;
top: 160px;
left: 0;
font-size: 20px;
color: #fff;
text-shadow: 0 1px 0 rgba(0,0,0,0.53);
text-align: center;
line-height: 150px;
}
.btn:hover {
background-position: 0 -155px;
padding-top: 2px;
}
.btn:before {
content: '';
position: absolute;
top: 50px;
right: 40px;
bottom: 50px;
left: 40px;
border: 6px solid transparent;
border-radius: 50px;
animation-duration: 1s;
}
.btn:hover:before, .btn:focus:before, .btn:active:before {
animation-name: hvr-ripple-out;
}
@keyframes hvr-ripple-out {
100% {
border-color: #ccc;
top: -12px;
right: -12px;
bottom: -12px;
left: -12px;
opacity: 0
}
}
{
"extends": [
"airbnb",
"prettier",
"prettier/react"
],
"plugins": [
"prettier"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"node": true
},
"rules": {
"no-plusplus": 0,
"no-confusing-arrow": 0,
"no-restricted-syntax": 0,
"guard-for-in": 0,
"class-methods-use-this": 0,
"jsx-a11y/no-static-element-interactions": 0,
"jsx-a11y/anchor-is-valid": 0,
"react/no-danger": 0,
"react/prop-types": 0,
"react/jsx-filename-extension": 0,
"react/jsx-curly-brace-presence": ["error", { "props": "never", "children": "never" }],
"import/no-unresolved": ["error", { "commonjs": true }],
"import/extensions": 0,
"import/no-extraneous-dependencies": ["error", {"devDependencies": true}],
"import/prefer-default-export": 0,
"prettier/prettier": ["error", {
"singleQuote": true,
"trailingComma": "all"
}]
},
"settings" : {
"import/resolver": {
"webpack": {
"config": "webpack/base.config.js"
}
}
}
}
{
"assets-webpack-plugin": "^3.5.1",
"babel-eslint": "^8.2.1",
"eslint": "^4.18.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-config-prettier": "^2.9.0",
"eslint-import-resolver-webpack": "^0.8.4",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-prettier": "^2.6.0",
"eslint-plugin-react": "^7.6.1",
"prettier": "^1.10.2",
}
var date = new Date();
date.setDate(date.getDate() + 3);
var dayOfMonth = date.getDate();
var month = date.getMonth() + 1;
document.body.innerHTML = 'Day: ' + dayOfMonth + ' Month: '+ month;
Демо SyntaxError: Unexpected token < in JSON at position 0
fetch(`http://api.openweathermap.org/data/2.5/forecast/?q=${this.state.value}&cnt=1&APPID=e94f24c463ec7a0d1a69ebdebc88c694&lang=ru`)
.then(res => res.json())
.then(json => console.log(json));