Skip to content

A library that enables simple use of the Alien Signals state management system in modern frontend frameworks.

License

Notifications You must be signed in to change notification settings

gn8-ai/universe-alien-signals

Repository files navigation

Universe alien-signals

license japanese documents

A library that enables simple use of the alien-signals state management system in modern frontend frameworks.

Warning

While it should work fine for general use, it hasn't been fully tested. Please use with caution.


πŸ›Έ Features

  • Simple: Easy to implement with minimal code
  • Flexible: Reuse a single signal across multiple frameworks
  • Type Safe: Full TypeScript support
  • Best Reactivity: Leverages alien-signals efficient signal management
  • Tree Shakable: Bundle only the code you need

πŸ”Œ Status

Framework Status SSR Support Usage Repo
React βœ… ⚠️ πŸ”— πŸ”—
Solid βœ… ⚠️ πŸ”— πŸ”—
Vue βœ… ⚠️ πŸ”— πŸ”—
Svelte βŒ›οΈ ⚠️ βŒ›οΈ βŒ›οΈ
  • βœ…: Implemented
  • πŸ›‘: Not Implemented
  • ⚠️: Not Verified
  • βŒ›οΈ: Coming Soon

πŸ’» Usage

React

Installation

npm install alien-signals @gn8/alien-signals-react

Sample Code

import { useSignal } from '@gn8/alien-signals-react';
import { signal } from 'alien-signals';

const $count = signal(0);

export default function Counter() {
  const [count, setCount] = useSignal($count);

  return (
    <button onClick={() => setCount(count + 1)}>
      count is {count}
    </button>
  );
}

Solid

Installation

npm install alien-signals @gn8/alien-signals-solid

Sample Code

import { useSignal } from '@gn8/alien-signals-solid';
import { signal } from 'alien-signals';

const $count = signal(0);

export default function Counter() {
  const [count, setCount] = useSignal($count);

  return (
    <button onClick={() => setCount(count() + 1)}>
      count is {count()}
    </button>
  );
}

Vue

Installation

npm install alien-signals @gn8/alien-signals-vue

Sample Code

<script setup>
import { useSignal } from '@gn8/alien-signals-vue';
import { signal } from 'alien-signals';

const $count = signal(0);

const count = useSignal($count);
</script>

<template>
  <button @click="count++">
    count is {{ count }}
  </button>
</template>

πŸ“š Roadmap

The following features and support will be added sequentially:

  • Implementation of @gn8/alien-signals-svelte
  • SSR verification and support
  • Enhancement of test coverage
  • Creation of Astro framework usage examples

πŸ’‘ Inspiration

This project is inspired by the following amazing library:

I have been a long-time user of Nanostores with Astro and was impressed by its ease of use. When I learned about alien-signals, I wanted to utilize its reactivity with the same user experience as Nanostores, which led to the development of this library.

Thanks to Nanostores' excellent implementation approach, we were able to quickly progress with support for various frameworks. Much of our code structure and design patterns are based on insights learned from Nanostores.

We deeply thank the Nanostores team for providing the inspiration and knowledge to start this project.


πŸŽ‰ Acknowledgments

Most of this library's power comes from alien-signals. We thank the developers of alien-signals.

About

A library that enables simple use of the Alien Signals state management system in modern frontend frameworks.

Resources

License

Stars

Watchers

Forks

Packages

No packages published