<input type='checkbox' name='checkbox[]' value="Москва" />
<input type='checkbox' name='checkbox[]' value="СПБ" />
<input type='checkbox' name='checkbox[]' value="Омск" />
const Example extends Component {
state = {
select: 'default value',
};
postData(data) {
fetch('api/somePath', {
method: 'post',
headers: {
'Accept': 'application/json, text/plain, */*',
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
}).then(res => res.json())
.then(data => {
// do something with data
});
}
handleChange = e => { /* ... */ };
handleSubmit = () => {
const { select } = this.state;
this.postData({ select });
};
render() {
return (
<Form>
<Select value={this.state.select} onChange={this.handleChange} />
<Button onClick={this.handleSubmit}>Submit</Button>
</Form>
);
}
}
version: "3"
services:
my-app:
image: my-app
ports:
- 3000:3000
volumes:
- dist:/web/dist
networks:
- app-network
nginx:
image: nginx
depends_on:
- my-app
ports:
- 80:80
volumes:
- dist:/usr/share/nginx/html
networks:
- app-network
volumes:
dist:
networks:
app-network: