Can you please consolidate all the codes and put together, which will help.
what you doing inside the diff function? How do you finding that the trace line is inside or outside ?
I appreciate your insightful blog post on freehand tracing with React Native. I am curious about the implementation details, but I understand that the source code is not publicly available. Thank you for sharing your knowledge and experience.
Unfortunately the source code wasn't intend to open source.
Hey Amit,
I guess the issue is around react-native-fs while getting the image path ?
Where can I find the code?
Thank you very much for spending time on this topic. I would like your help. Wanted to know if you encountered any error related to "could not parse path from string".
Here's an example of how you could do diffing
export const removedPath = (paths, target) => { return paths.filter(path => path !== target); };import {removedPath} from './index'; const targetOne = [ [1, 1], [1, 2], [1, 3], [1, 4], ]; const targetTwo = [ [2, 1], [2, 2], [2, 3], [2, 4], ]; const originPath = [targetOne, targetTwo]; describe('removedPath', () => { test('should remove targetOne and left targetTwo', () => { const result = removedPath(originPath, targetOne); expect(result).toEqual([targetTwo]); }); test('should remove nothing', () => { const result = removedPath([targetTwo], targetOne); expect(result).toEqual([targetTwo]); }); });