Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

hugoleon46's avatar

hugoleon46 wrote a comment+100 XP

5mos ago

React, The Laravel Way: Ep 30, Image Upload Preview

The course was a lot of fun! I loved how you approached each element so clearly, paying attention to the many small details that make all the difference in any project.

Thank you so much for your effort in this course!.

hugoleon46's avatar

hugoleon46 wrote a comment+100 XP

6mos ago

React, The Laravel Way: Ep 3, In-House Puppy Data

@sudhansubhushanmishra

💡 Fix: White Text on White Background

If your app defaults to Dark Mode (class="dark") despite your preference, it's because the theme logic (in use-appearance.tsx) is falling back to 'system' when no preference is saved. This causes issues if your OS is set to Dark Mode.

There are two ways to fix this:

1. Immediate Fix (Using Browser Console)

To immediately see the correct colors, open your browser's Developer Console and set the theme to light:

localStorage.setItem('appearance', 'light');
// Then, refresh the page.

2. Permanent Fix (Editing Code)

To make Light Mode the permanent default fallback, modify the use-appearance.tsx file and change the default value from 'system' to 'light' in these two places:

In initializeTheme():

const savedAppearance =
    (localStorage.getItem('appearance') as Appearance) || 'light';

In useAppearance() Hook's useEffect:

updateAppearance(savedAppearance || 'light');

Final Step: Recompile your assets.

$ composer run dev