DEV Community

Cover image for Dative.JS Tutorial
Tobi
Tobi

Posted on

3 2

Dative.JS Tutorial

Introduction

DativeJs Is A Mordern Ui Javascript FrameWork

How Do I Use Dative.Js

First

Scaffold A Project

$ npx degit dativeJs/template my-app

# Install All The Dependencies
$ npm i
Enter fullscreen mode Exit fullscreen mode

That Command Should Create a template with Dative.JS There

File Structure Should Be Considered While Creating a New Component

my-app
|- src
   |- your-component
      |- your-component.dative.html // The Template
      |- your-component.dative.js // The Script
Enter fullscreen mode Exit fullscreen mode
  // your-component.dative.js
  import Dative from 'dativejs';
  import template from './your-component.dative.html';

  export let YourComponent = Dative.extend({
     template,
     // Other Options Goes Here
  })
Enter fullscreen mode Exit fullscreen mode

Then You Can Import it in the src/index.js

import { YourComponent } from './your-component/your-component.dative'

...

app.attach([
  ...,
  new YourComponent({
     el: '#your-component-id'
  })
])
Enter fullscreen mode Exit fullscreen mode

You Set

Check DativeJS Docs for more details

Thanks For Reading :)

Quadratic AI

Quadratic AI – The Spreadsheet with AI, Code, and Connections

  • AI-Powered Insights: Ask questions in plain English and get instant visualizations
  • Multi-Language Support: Seamlessly switch between Python, SQL, and JavaScript in one workspace
  • Zero Setup Required: Connect to databases or drag-and-drop files straight from your browser
  • Live Collaboration: Work together in real-time, no matter where your team is located
  • Beyond Formulas: Tackle complex analysis that traditional spreadsheets can't handle

Get started for free.

Watch The Demo πŸ“Šβœ¨

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

πŸ‘‹ Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay