{"size": 536, "ext": "js", "max_stars_repo_path": "Basic_Vue/Data_binding_in_forms/app.js", "max_stars_repo_name": "ricardo1470/learning_vue", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Basic_Vue/Data_binding_in_forms/app.js", "max_issues_repo_name": "ricardo1470/learning_vue", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Basic_Vue/Data_binding_in_forms/app.js", "max_forks_repo_name": "ricardo1470/learning_vue", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.3043478261, "max_line_length": 72, "alphanum_fraction": 0.4776119403}
const vm = new Vue({
    mounted() {
        if (window.localStorage.getItem('form'))
            this.form = JSON.parse(window.localStorage.getItem('form'));
    },
    el: "#app",
    data: {
        form: {
            name: '',
            lastName: '',
            message: '',
            contact: '',
            products: '',
            accepts: false,
        }
    },
});

vm.$watch('form', (recent, former) => {
    window.localStorage.setItem('form', JSON.stringify(recent));
}, { deep: true })
Vue.config.devtools = true;
