mobx#observable TypeScript Examples

The following examples show how to use mobx#observable. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: utils.ts    From binaural-meet with GNU General Public License v3.0 6 votes vote down vote up
export function shallowObservable<T extends Object>(obj: T) {
  return observable(obj, undefined, {deep: false})
}
Example #2
Source File: Transaction.ts    From dxvote with GNU Affero General Public License v3.0 6 votes vote down vote up
constructor(context) {
    this.context = context;
    this.txRecords = {};
    makeObservable(this, {
      txRecords: observable,
      checkPendingTransactions: action,
      addTransactionRecord: action,
      reset: action,
    });
  }
Example #3
Source File: DeployContractsContainer.ts    From clarity with Apache License 2.0 5 votes vote down vote up
@observable signDeployModal: boolean = false;
Example #4
Source File: ClientsStore.ts    From eth2stats-dashboard with MIT License 5 votes vote down vote up
@observable sortBy: string;
Example #5
Source File: store.ts    From generator-earth with MIT License 5 votes vote down vote up
/**
     * 当前加载状态
     */
    @observable isLoading: boolean = false;
Example #6
Source File: UserStore.ts    From Frontend with MIT License 5 votes vote down vote up
decorate(UserStore, {
  authUser: observable,
  token: observable,
  setAuthUser: action,
  setToken: action
});
Example #7
Source File: Store.ts    From eth2stats-dashboard with MIT License 5 votes vote down vote up
@observable columns: IColumn[] = [ //TODO extract from here
        {
            name: "pin",
            label: "",
            classes: "w-10 flex-shrink-0",
            mobileIcon: "",
            sortable: false
        },
        {
            name: "name",
            label: "Name",
            mobileIcon: "network-wired",
            classes: "flex-grow flex-basis",
            sortable: true
        },
        {
            name: "type",
            label: "Type",
            mobileIcon: "laptop-code",
            classes: "sm:w-24 xl:w-32 flex-shrink-0",
            sortable: false
        },
        {
            name: "peers",
            label: "Peers",
            mobileIcon: "users",
            classes: "sm:w-16 xl:w-32 flex-shrink-0",
            sortable: true
        },
        {
            name: "attestations",
            label: "Attestations",
            mobileIcon: "check-double",
            classes: "sm:w-16 xl:w-32 flex-shrink-0",
            sortable: true
        },
        {
            name: "headSlot",
            label: "Head Slot",
            mobileIcon: "cube",
            classes: "sm:w-24 xl:w-32 flex-shrink-0",
            sortable: true
        },
        {
            name: "justifiedSlot",
            label: "Justified Slot",
            classes: "sm:w-24 xl:w-32 flex-shrink-0",
            sortable: false
        },
        {
            name: "finalizedSlot",
            label: "Finalized Slot",
            classes: "sm:w-24 xl:w-32 flex-shrink-0",
            sortable: false
        },
        {
            name: "memory",
            label: "Mem Usage",
            mobileIcon: "microchip",
            classes: "sm:w-24 xl:w-32 flex-shrink-0",
            sortable: false
        },
        {
            name: "options",
            label: "",
            classes: "w-10 flex-shrink-0",
            // mobileIcon: '',
            sortable: false
        }
    ];
Example #8
Source File: NetworkInfoContainer.ts    From clarity with Apache License 2.0 5 votes vote down vote up
@observable validatorSize: number = 0;