.get('http://example.com/wp-content/themes/armed/mobile/react.php')
127.0.0.1 project
server {
listen 80;
server_name project;
location ^~ / {
proxy_pass http://localhost:3000/;
}
location ^~ /api/ {
proxy_pass http://localhost:3001/api/;
}
}
delete не должен же трогать прототип вообще в этом случаеС чего вы так решили?
import React, { Component } from 'react';
import { Child } from './Child';
import { getSomeData } from './api';
class Parent extends Component {
state = {
data: [],
};
componentDidMount() {
getSomeData.then(data => this.setState({ data });
}
render() {
return <Child data={this.state.data} />;
}
}
var a = {};
+function b(c) {
console.log(a === c); // true
c.a = 10;
c = null;
console.log(a === c); // false
}(a);
console.log(a); // { a: 10 }
document.addEventListener("DOMContentLoaded", function() {
var element = document.getElementsByClassName("drop_menu_container");
console.log(element[0]);
});
selector {
rule1: $value1_1;
rule2: $value2_1;
...
ruleN: $valueN_1;
transition: all $transition_time;
&:hover {
rule1: $value1_2;
rule2: $value2_2;
...
ruleN: $valueN_2;
}
}
function foo(props) {
var a = isNumber(props.a) ? props.a : 100;
var b = isNumber(props.b) ? props.b : 200;
var c = isNumber(props.c) ? props.c : 300;
var d = isNumber(props.d) ? props.d : 400;
return a + b + c + d;
}
function isNumber(n) {
return !isNaN(parseFloat(n)) && isFinite(n);
}
const foo = ({ a = 100, b = 200, c = 300, d = 400 }) => a + b + c + d;
foo({ a: 0, d: 500 }); // 1000
import libraryName from 'libraryName';
libraryName.someMethod();
import { someMethod } from 'libraryName';
someMethod();