frontend-hamroun 1.2.5 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -141,4 +141,21 @@ function ContextConsumer() {
141
141
  );
142
142
  }
143
143
 
144
- render(<App />, document.getElementById('root')!);
144
+ import { render, createContext } from 'frontend-hamroun';
145
+ import { App } from './App';
146
+
147
+ // Create an example context
148
+ export const AppContext = createContext({ theme: 'light' });
149
+
150
+ document.addEventListener('DOMContentLoaded', () => {
151
+ const rootElement = document.getElementById('app');
152
+ if (rootElement) {
153
+ render(
154
+ <AppContext.Provider value={{ theme: 'light' }}>
155
+ <App />
156
+ </AppContext.Provider>,
157
+ rootElement
158
+ );
159
+ console.log('App rendered successfully');
160
+ }
161
+ });