npm install --save-dev @babel/register @babel/plugin-proposal-class-properties
- or -
yarn add --dev @babel/register @babel/plugin-proposal-class-properties
import React, { Component } from 'react'; | |
export default function withSyncChange(WrappedComponent) { | |
return class extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
value: props.value, // initial value | |
parentValue: props.value, // tracking the parent value | |
}; |
# Initial setup | |
git clone -o laravel -b master https://github.com/laravel/laravel.git project-name | |
cd project-name | |
git checkout --orphan master | |
git commit -m "Initial commit" | |
composer install | |
# --or, simply-- | |
composer create-project laravel/laravel | |
# Pulling changes |