JSFiddle - React, Tailwind, and code Playground

JavaScript

function obj()
{
    var that = this;

    that.margin = 10;
    that.setMargin = function(val) { 
        that.margin = val; 
    };
    that.foptions = { 
        labelMargin: that.margin 
    };
    that.marginClone = that.margin;
}

var inst = new obj();
inst.setMargin(2);
console.dir(inst.foptions);
console.log(inst.marginClone);
console.log(inst.margin);