vroqjs.com

08-recipes/06-fix-a-bug.md

Fix a bug

Fix a bug

Use this recipe when a Vroq app shows incorrect behavior and the cause must be identified and corrected.

Steps

1. Identify the visible symptom. 2. Determine which feature owns the behavior. 3. Inspect the state slice involved. 4. Check the action that should have triggered the change. 5. Inspect the reducer handling that action. 6. Check any API client involved in the data flow. 7. Apply the smallest fix at the root cause.

Debugging path

Follow the standard state debugging flow:

UI → action → reducer → state → UI

This helps locate where the incorrect transition occurred.

What to avoid

Do not fix bugs by adding UI-side workarounds when the issue belongs in:

  • reducer logic
  • action payload
  • API normalization

Avoid adding special cases unless the architecture clearly requires it.

Final rule

Fix bugs at the layer that owns the behavior so the system becomes more predictable and easier to debug.