added preserve validation function#182
added preserve validation function#182vtushar06 wants to merge 2 commits intojson-schema-org:mainfrom
Conversation
|
Hi @vtushar06, Can you please move all the custom hooks in the Editor component (and from the whole codebase) to a new file called Try to have PRs with has less file diff, so it becomes easier to review. |
|
Hi @JeelRajodiya, thank you for the feedback! I was waiting for your suggestions before proceeding further. I’ll go ahead and refactor all the custom hooks into a new ./utils/hooks.ts file as recommended and add detailed comments explaining the purpose and changes made in the code. I’ll update the PR shortly. |
17f5333 to
54f4305
Compare
|
Hii @JeelRajodiya, I have pushed the necessary changes which you suggested can you please have a look into that. Thanks |
What kind of change does this PR introduce?
Feature enhancement
Issue Number:
Screenshots/videos:
tour.mp4
If relevant, did you update the documentation?
No documentation updates required for this feature.
Summary
This pull request addresses a critical UX issue by implementing persistent client-side storage of validation results and user code using localStorage with namespaced keys (
validation-{chapterIndex}-{stepIndex}). The solution enhances state management through Zustand integration, enabling seamless data restoration and mutation across component lifecycles.Technical Implementation:
useValidationRestore) orchestrating state restoration via useEffect with SSR compatibility checksDoes this PR introduce a breaking change?
No