This is not currently a problem, but with https://github.com/BenJeau/react-native-draw/issues/46, if this is not implemented, it will become a problem since the keys for SVG paths is simply the index, and it will not be linear like it is right now once layering is implemented.
I think that the current time that the stroke was drawn is a good addition and we should still add a uuid to the paths or a counter (but a uuid would be easier implementation-wise)
This is not currently a problem, but with https://github.com/BenJeau/react-native-draw/issues/46, if this is not implemented, it will become a problem since the keys for SVG paths is simply the index, and it will not be linear like it is right now once layering is implemented.
Implementation
Generate a random ID and add it to the path:
uuid
andreact-native-get-random-values
Canvas
, there would be collisionspath
itself, but there may a problem if it happens that the user draw the exactly same path