Skip to content

Writable for computeds #44

@julien-f

Description

@julien-f

It could be interesting to have settable computed:

const withState = provideState({
  initialState: () => ({ kelvin: 42 }),
  computeds: {
    celsius: {
      get: state => state.kelvin - 273.15,
      set (value) {
        state.kelvin = value + 273.15
      },
    },
  },
})

Other libs providing this feature:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions