flexyford / impagination

A lazy data layer for your paged records
102 stars 7 forks source link

`post()` and `put()` methods mutate existing state #37

Closed cowboyd closed 6 years ago

cowboyd commented 7 years ago

The splice() method changes the contents of the array on which it was called.

https://github.com/flexyford/impagination/blob/7381e66fb8134358da6e90b5109f4575d2a3df21/src/dataset.js#L80-L90

flexyford commented 7 years ago

The splice method returns a new state

https://github.com/flexyford/impagination/blob/7381e66fb8134358da6e90b5109f4575d2a3df21/src/state.js#L142-L163

cowboyd commented 6 years ago

Oh snap! Totally missed that.