2.0.0 • Published 3 years ago

stimulus-poller v2.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

Stimulus Poller controller

Credit goes to Drifting Ruby

Installation

(this assumes rails-ujs is already installed)

  1. Add package yarn add stimulus-poller
  2. Import package in your application
import { Application } from 'stimulus'
const application = Application.start()

import PollerController from 'stimulus-poller'
application.register('poller', PollerController)

Configuration

<div data-controller="poller"
     data-poller-duration-value="5000" <!-- 5000ms by default -->
     data-poller-url-value="example.com/page.html">
</div>

Publish new version

  1. Run yarn build
  2. Update CHANGELOG.md
  3. Run yarn publish