How to use redux-vuex - 10 common examples

To help you get started, we’ve selected a few redux-vuex examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github podlove / podlove-ui / backup / src / components / tabs / Tabs.vue View on Github external
import DownloadIcon from 'icons/DownloadIcon'
import InfoIcon from 'icons/InfoIcon'
import AudioIcon from 'icons/AudioIcon'
import TranscriptsIcon from 'icons/TranscriptsIcon'

const tabs = {
  InfoTab: () => import(/* webpackMode: "eager" */'./info/Info'),
  ShareTab: () => import(/* webpackMode: "eager" */'./share/Share'),
  ChaptersTab: () => import(/* webpackMode: "eager" */'./chapters/Chapters'),
  TranscriptsTab: () => import(/* webpackMode: "eager" */'./transcripts/Transcripts'),
  FilesTab: () => import(/* webpackMode: "eager" */'./files/Files'),
  AudioTab: () => import(/* webpackMode: "eager" */'./audio/Audio')
}

export default {
  data: mapState('theme', 'tabs', 'chapters', 'reference', 'visibleComponents', 'components', 'volume', 'muted'),
  computed: {
    containerStyle () {
      return {
        'background-color': this.theme.tabs.body.background
      }
    },
    isVisibleTab () {
      return {
        info: this.components.tabs.info && this.visibleComponents.tabInfo,
        chapters: this.components.tabs.chapters && this.visibleComponents.tabChapters,
        share: this.components.tabs.share && this.visibleComponents.tabShare,
        files: this.components.tabs.files && this.visibleComponents.tabFiles,
        transcripts: this.components.tabs.transcripts && this.visibleComponents.tabTranscripts,
        audio: this.components.tabs.audio && this.visibleComponents.tabAudio
      }
    },
github podlove / podlove-ui / backup / src / components / tabs / audio / AudioRate.vue View on Github external
}

  const stateToSpeedSlider = (value = 0) => {
    value = parseFloat(value)

    if (value <= 1) {
      value = value - 0.5
    } else {
      value = (value + 2) / 6
    }

    return value
  }

  export default {
    data: mapState('rate', 'theme'),
    computed: {
      sliderRate () {
        return this.toSliderRate(this.rate)
      }
    },
    methods: {
      ...mapActions('setRate'),
      toStateRate (value) {
        compose(
          this.setRate.bind(this),
          round,
          speedSliderToState,
          normalizeSliderValue
        )(value)
      },
      setStateRate (value) {

redux-vuex

Redux bindings for VueJS inspired by Vuex.

MIT
Latest version published 13 days ago

Package Health Score

67 / 100
Full package analysis

Popular redux-vuex functions