You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two related problems with the "Recent conversions" feature:
History almost never saves. The save effect's dependency array is [sourceFramework, targetFramework] only, so entries are recorded solely when the user changes frameworks. The most common flow — paste code, read the output, leave — records nothing. (The "debounced" code comment is inaccurate; there is no debounce, just a missing dependency.) Suggested: debounce on sourceCode changes for real, e.g. save 2s after the last edit when a conversion succeeded.
Hydration mismatch. The useState initializer reads localStorage during hydration, so the client renders "Recent (N)" against the prerendered "Recent (0)" — a React hydration warning on every visit for anyone with saved history. Standard fix: initialize to [] and load from localStorage in a useEffect.
Where: converter page (
converter/page.tsx)Two related problems with the "Recent conversions" feature:
[sourceFramework, targetFramework]only, so entries are recorded solely when the user changes frameworks. The most common flow — paste code, read the output, leave — records nothing. (The "debounced" code comment is inaccurate; there is no debounce, just a missing dependency.) Suggested: debounce onsourceCodechanges for real, e.g. save 2s after the last edit when a conversion succeeded.useStateinitializer readslocalStorageduring hydration, so the client renders "Recent (N)" against the prerendered "Recent (0)" — a React hydration warning on every visit for anyone with saved history. Standard fix: initialize to[]and load fromlocalStoragein auseEffect.