All Projects → atomicojs → Atomico

atomicojs / Atomico

Licence: mit
Atomico a micro-library for creating webcomponents using only functions, hooks and virtual-dom.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Atomico

element
Fast and simple custom elements.
Stars: ✭ 65 (-86.49%)
Mutual labels:  jsx, web-components, shadow-dom
Omi
Front End Cross-Frameworks Framework - 前端跨框架跨平台框架
Stars: ✭ 12,153 (+2426.61%)
Mutual labels:  web-components, jsx, shadow-dom
15 Puzzle
The 15-puzzle is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing, built in react
Stars: ✭ 161 (-66.53%)
Mutual labels:  hooks, jsx
Fre
👻 Tiny Footprint Concurrent UI library for Fiber.
Stars: ✭ 3,195 (+564.24%)
Mutual labels:  hooks, jsx
lwc-test
LWC plugins and utilities for testing
Stars: ✭ 39 (-91.89%)
Mutual labels:  web-components, shadow-dom
Eplayer
🔮 A web-component html5 video player facing future
Stars: ✭ 253 (-47.4%)
Mutual labels:  web-components, shadow-dom
Reason Reactify
🚀 Transform a mutable tree into a functional React-like API
Stars: ✭ 102 (-78.79%)
Mutual labels:  hooks, jsx
helium-animated-pages
A light spiritual succesor to neon-animated-pages using only css animations
Stars: ✭ 17 (-96.47%)
Mutual labels:  web-components, shadow-dom
Nutmeg
Build, test, and publish vanilla Web Components with a little spice
Stars: ✭ 111 (-76.92%)
Mutual labels:  web-components, shadow-dom
grid-container
A grid for the future, CSS Grid Layout + Web Components (Custom Elements v1 + Shadow DOM v1)
Stars: ✭ 51 (-89.4%)
Mutual labels:  web-components, shadow-dom
focus-trap
A lightweight web component that traps focus within a DOM node
Stars: ✭ 44 (-90.85%)
Mutual labels:  web-components, shadow-dom
Shadow Dom In Depth
Everything you need to know about Shadow DOM
Stars: ✭ 191 (-60.29%)
Mutual labels:  web-components, shadow-dom
ionic-custom-components
🌈 Ionic Tutorial: Mastering Web Components in Ionic Framework. This repo is an Ionic project showcasing Angular custom components and Stencil custom web components.
Stars: ✭ 30 (-93.76%)
Mutual labels:  web-components, shadow-dom
Haunted
React's Hooks API implemented for web components 👻
Stars: ✭ 2,197 (+356.76%)
Mutual labels:  hooks, web-components
Virtual Dom
关于Vue,React,Preact和Omi等框架源码的解读
Stars: ✭ 139 (-71.1%)
Mutual labels:  web-components, jsx
React Hooks
Build a CRUD app in React with Hooks.
Stars: ✭ 250 (-48.02%)
Mutual labels:  hooks, jsx
Custom Elements Ts
Create native custom elements using Typescript
Stars: ✭ 52 (-89.19%)
Mutual labels:  web-components, shadow-dom
Dataformsjs
🌟 DataFormsJS 🌟 A minimal JavaScript Framework and standalone React and Web Components for rapid development of high quality websites and single page applications.
Stars: ✭ 95 (-80.25%)
Mutual labels:  web-components, jsx
Shadow-DOM-inject-styles
🎉 A helper function to easily modify Shadow DOM CSS.
Stars: ✭ 47 (-90.23%)
Mutual labels:  web-components, shadow-dom
web-components-tutorial
HTML Web Component using Vanilla JavaScript
Stars: ✭ 38 (-92.1%)
Mutual labels:  web-components, shadow-dom

Atomico

npm gzip

Atomico a micro-library for creating webcomponents using only functions, hooks and virtual-dom.

import { c } from "atomico";

function myComponent({ message }) {
    return <host>Hello, {message}</host>;
}

myComponent.props = { message: String };

customElements.define("my-component", c(myComponent));

Links:

  1. What is Atomico?
  2. Documentation
    1. 🧬 Props(Properties)
    2. 🧩 Virtual-dom
    3. 🎣 Hooks
  3. Resources
    1. Brand

What is Atomico?

Atomico is a modern syntax micro-library created by Matias Trujillo alias @UpperCod, which simplifies the creation of webcomponents by replacing the need to use classes and contexts by functions and scope to support logic, attributes, properties, methods and events, example:

import { c, useProp } from "atomico";

function myComponent() {
    const [count, setCount] = useProp("count");
    const increment = () => setCount(count + 1);
    return <host increment={increment}>count: {count}</host>;
}

myComponent.props = {
    count: { type: Number, value: 0 },
};

customElements.define("my-component", c(myComponent));

Where:

  1. myComponent: Function that represents the webcomponent.

  2. const [count, setCount] = useProp("count"): Hook function similar to useState, but with the difference that useProp reflects the property status of the component.

  3. const increment = () => setCount(count + 1);: Function that increases the state.

  4. <host increment={increment}>: Virtual-dom represented the incremental method.

  5. myComponent.props.count : Object, defines the behavior of the count property.

    1. type: Number : Declare count as type number.
    2. value: 0: Declares that the initial state of count is0.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].