1.0.4 • Published 2 years ago

storken-broadcast v1.0.4

Weekly downloads
49
License
MIT
Repository
github
Last release
2 years ago

storken-broadcast

Broadcasts the effected states to other tabs.

When changed a state value in a tab and if there is another tab for the same site that contains the state then its value changes in all the tabs by this plugin.

Installation

# yarn
yarn add storken-broadcast

# npm
npm install storken-broadcast

Usage

import { create as createStore } from 'storken'
import Broadcast from 'storken-broadcast'

const [useStorken] = createStore({
  plugins: {
    broadcast: Broadcast
  },
  storkenOptions: {
    tableData: {
      broadcast: true
    }
  }
})

Options

Storage options should be passed in storkenOptions by key.

There is just one option for this plugin. Pass true for broadcast if you want to broadcast value of the state to all of the tabs when state is set.

broadcast: defaults to undefined, so, false.

License

Distributed under the MIT license.

Contribute

You can contribute by fork this repositry and make pull request.

1.0.5-beta.0

2 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago