Hello. I am a beginner in IT and currently working on a React app where I need to implement functionality that allows users to see highlighted differences in JSON configurations. The application uses two panels: one displaying the original JSON content and another for editing. I have integrated JSONEditor instances into the React DOM using 'useRef'.
I am considering using the 'deep-diff' library to track changes between the original and modified JSON, but I am unsure how to effectively apply these differences to highlight changes within the JSONEditor instances. Could someone please help me outline an approach or provide examples of how to achieve this?
Specific Challenges:
How to apply the results from 'deep-diff' to dynamically highlight changes in JSONEditor?
Is there a recommended way to visually represent these differences in the JSONEditor interface using React?
Any guidance or suggestions would be greatly appreciated!
Here's a snippet of how I'm currently setting up the JSONEditors:
Hello. I am a beginner in IT and currently working on a React app where I need to implement functionality that allows users to see highlighted differences in JSON configurations. The application uses two panels: one displaying the original JSON content and another for editing. I have integrated JSONEditor instances into the React DOM using 'useRef'. I am considering using the 'deep-diff' library to track changes between the original and modified JSON, but I am unsure how to effectively apply these differences to highlight changes within the JSONEditor instances. Could someone please help me outline an approach or provide examples of how to achieve this? Specific Challenges:
Here's a snippet of how I'm currently setting up the JSONEditors: