diff --git a/src/component.js b/src/component.js
index be5aa95..ee9db59 100644
--- a/src/component.js
+++ b/src/component.js
@@ -596,6 +596,11 @@ class Component extends StyleAndScriptStoringComponent {
 
         this._wenity.html = this._element;
 
+        for (let i = 0; i < this._toRegister.length; i++) {
+            const group = this._toRegister[i];
+            Page.subscribeComponentToGroup(group, this._compName)
+        }
+
         return this._wenity;
     }
 
diff --git a/src/context.js b/src/context.js
index 773c0b6..a4b0e94 100644
--- a/src/context.js
+++ b/src/context.js
@@ -21,10 +21,29 @@ class PageBuilder extends ScriptAndStyleContext {
         super();
         this.#autoRegisteredComponents = [];
         this.#registeredComponents = [];
+        this._groups = new Map();
+    }
 
     useCssCalc() {
         this._useCssCalc = true;
     }
+
+    /**
+     * 
+     * @param {*|Array<*>} groups 
+     * @param {*} component 
+     */
+    subscribeComponentToGroup(groups, component) {
+        if (groups instanceof Array && !(groups instanceof String)) {
+            for (let i = 0; i < groups.length; i++) {
+                this.subscribeComponentToGroup(groups[i], component);
+            }
+        } else {
+            if (!this._groups.has(groups)) {
+                this._groups.set(groups, []);
+            }
+            this._groups.get(groups).push(component);
+        }
     }
 
     autoRegisterComponent() {
@@ -159,6 +178,13 @@ class PageBuilder extends ScriptAndStyleContext {
         head.insertAdjacentElement("beforeend", meta);
     }
 
+    generate() {
+        super.generate();
+        compelgroups = this._groups;
+    }
+
+
+
 
 
 }