innards7
innards7
SSolidJS
Created by innards7 on 6/7/2024 in #support
Question about store `range` update API
I've been trying to update the docs for the store page and I noticed an API decision I found surprising. The path syntax for specifying a range of indices to update in an array { from: 3, to: 7 } is inclusive for both start and end. Most similar JS APIs I can think of (.slice for example) are start inclusive, end exclusive. Does anyone know why the index range API works this way? I thought it might be worth calling out in the docs, but I'm also just curious even if it's not.
9 replies