Function createRingBufferAtom
- createRingBufferAtom<ElementType>(context, capacity?, defaultData?): StateAtom<RingBuffer<ElementType>, {
add: ((data, element) => boolean);
clear: ((data) => boolean);
}>
-
Parameters
-
-
Optional
capacity: number
-
Optional
defaultData: ElementType[]
Returns StateAtom<RingBuffer<ElementType>, {
add: ((data, element) => boolean);
clear: ((data) => boolean);
}>