Child theme with sage 10

Is there any proper guide for setting up the child theme with sage 10? I am using sage 10 as my main theme on WordPress and for customizations, I have to create the child theme. I tried following this discussion to create the child theme and it does not work. Changing the parent theme’s namespace to Parent (from App) breaks the connection between composers and views, data does not go to the views.

Child theme is activated.

getting this error

Undefined variable $heroBackground in section-page-header.blade.php
$heroBackground is defined in the Parent\View\Composers\App.php

in the child App.php I have the following code

<?php

namespace App\View\Composers;

use Roots\Acorn\View\Composer;

class App extends Composer
{
}

And in the child theme’s App\Providers\ThemeServiceProvider

<?php

namespace App\Providers;

use Roots\Acorn\ServiceProvider;

class ThemeServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }

    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        //this outputs the correct data from the parent function
        dd((new \Parent\View\Composers\App())->getColorScheme());
    }
}

I have changed the namespaces in my composer.json files as well.
Parent composer file

"autoload": {
    "psr-4": {
      "Parent\\": "app/"
    }
  },

Child theme composer file

"autoload": {
    "psr-4": {
      "App\\": "app/",
      "Parent\\": "./../theme-name/app"
    }
  }

This is how my child theme’s structure looks like. Screenshot-2022-02-04-at-16-34-23 — ImgBB

Any hint about where to go from this point will be much appreciated.