<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
| { | |
| "window.zoomLevel": 0, | |
| "editor.fontFamily": "Operator Mono Medium, Menlo, Monaco, 'Courier New', monospace", | |
| "editor.fontSize": 14, | |
| "editor.fontLigatures": true, | |
| "editor.tabSize": 4, | |
| "editor.mouseWheelZoom": true, | |
| "editor.rulers": [120], | |
| "editor.smoothScrolling": true, | |
| "editor.tabCompletion": true, |
| // Parsley plugin initialization with tweaks to style Parsley for Bootstrap 4 | |
| $("#my-form").parsley({ | |
| errorClass: 'is-invalid text-danger', | |
| successClass: 'is-valid', // Comment this option if you don't want the field to become green when valid. Recommended in Google material design to prevent too many hints for user experience. Only report when a field is wrong. | |
| errorsWrapper: '<span class="form-text text-danger"></span>', | |
| errorTemplate: '<span></span>', | |
| trigger: 'change' | |
| }) /* If you want to validate fields right after page loading, just add this here : .validate()*/ ; | |
| // Parsley full doc is avalailable here : https://github.com/guillaumepotier/Parsley.js/ |
| handleInputChange(name, value, args = {}) { | |
| const { key, ...restArgs } = args; | |
| let obj = {}; | |
| if (typeof key !== 'undefined') { | |
| if (Object.keys(restArgs).length === 0 && restArgs.constructor === Object) { | |
| obj = { ...this.state[key], ...{ [name]: value } }; | |
| } else { | |
| obj = { ...this.state[key], ...{ [name]: value, ...restArgs } }; | |
| } |
| class JsxControls extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| counter: 100 | |
| } | |
| } | |
| render() { | |
| return ( |
| // getComponent is a function that returns a promise for a component | |
| // It will not be called until the first mount | |
| function asyncComponent(getComponent) { | |
| return class AsyncComponent extends React.Component { | |
| static Component = null; | |
| state = { Component: AsyncComponent.Component }; | |
| componentWillMount() { | |
| if (!this.state.Component) { | |
| getComponent().then(Component => { |
| // component | |
| shouldComponentUpdate(nextProps, nextState) { | |
| console.group('react-logger'); | |
| console.log('[prevProps]', this.props); | |
| console.log('[nextProps]', nextProps); | |
| console.log('[prevState]', this.state); | |
| console.log('[nextState]', nextState); | |
| console.log('[propsChange]', difference(this.props, nextProps)); | |
| console.log('[stateChange]', difference(this.state, nextState)); | |
| console.groupEnd('react-logger'); |
| // var config = require('./config.js').get(process.env.NODE_ENV); | |
| var config = { | |
| production: { | |
| session: { | |
| key: 'the.express.session.id', | |
| secret: 'something.super.secret' | |
| }, | |
| database: 'mongodb://<user>:<pwd>@apollo.modulusmongo.net:27017/db', | |
| twitter: { |
| { | |
| "name": "project-name", | |
| "description": "Template for static sites", | |
| "version": "1.0.0", | |
| "homepage": "http://www.project-name.com", | |
| "author": { | |
| "name": "Adam Buczynski", | |
| "url": "http://adambuczynski.com" | |
| }, | |
| "license": "UNLICENSED", |
| if (!toast.isActive(this.toastId)) { | |
| const { message } = response.data; | |
| this.toastId = toast.success(message); | |
| } |