Skip to content

Construct a DevExtreme ArrayStore from an array and keep it in sync when the array changes.

License

Notifications You must be signed in to change notification settings

gdrbyKo1/react-use-devextreme-arraystore

Repository files navigation

@gdrbyko1/react-use-devextreme-arraystore

Construct a DevExtreme ArrayStore from an array and keep it in sync when the array changes.

NPM JavaScript Style Guide

Install

npm install --save @gdrbyko1/react-use-devextreme-arraystore

Usage

dxArrayStore = useDxArrayStore(items: any[], key: string)

The key parameter specifies the name of the property which can be used to uniquely identify an object in the array. The hook will take care of pushing updates to the ArrayStore whenever the array changes.

import * as React from 'react'

import { useDxArrayStore } from '@gdrbyko1/react-use-devextreme-arraystore'

const Example = () => {
  const dxArrayStore = useDxArrayStore([], 'keyField')
  return (
    <div>
      todo
    </div>
  )
}

License

MIT © gdrbyKo1


This hook is created using create-react-hook.

About

Construct a DevExtreme ArrayStore from an array and keep it in sync when the array changes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published