Getting Started
Install eJThB7
npm install @ejthb7/core
Use in your JavaScript project with:
import { App } from '@ejthb7/core';
const app = new App({ el: '#container' });
🚀
Ready in seconds
API Reference
Core Functions
app.init(config)
- Initialize applicationapp.renderComponent(component)
- Render UI elementapp.start()
- Begin execution
Component Lifecycle
onLoad()
- Called when component is loadedonRender()
- Before UI updateonDestroy()
- Final cleanup
Example
// Create counter component
const Counter = {
template: `
Counter: {{ count }}
`,
data: { count: 0 },
methods: {
increment() { this.count++ }
}
};
// Initialize application
const app = new App({
el: '#app',
components: { Counter }
});
.Counter
Current Value: 0