diff --git a/lib/modules/MyCoursesWidget.php b/lib/modules/MyCoursesWidget.php
index ba73e5b0405eb69c4dde1f22ce4c06aaaca52965..f4f29397d70369aa577f88fc688db5a9f80384d3 100644
--- a/lib/modules/MyCoursesWidget.php
+++ b/lib/modules/MyCoursesWidget.php
@@ -27,11 +27,13 @@ class MyCoursesWidget extends CorePlugin implements PortalPlugin
     {
         // get the MyCoursesController in order to prepare the correct data for the overview
         $controller = app(MyCoursesController::class, ['dispatcher' => app(\Trails\Dispatcher::class)]);
-        $data = $controller->getPortalWidgetData();
 
-        // add the json data to the head so vue can grab it
-        PageLayout::addHeadElement('script', [], 'STUDIP.MyCoursesData = ' . json_encode($data) . ';');
-
-        return $GLOBALS['template_factory']->open('start/my_courses');
+        return Studip\VueApp::create('MyCourses')
+            ->withStore(
+                'MyCoursesStore',
+                'mycourses',
+                $controller->getPortalWidgetData()
+            )
+            ->getTemplate();
     }
 }