1.0.9 • Published 5 years ago

archway-framework v1.0.9

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

archway-framework

Small but powerful UI centered framework

  • USH, or JSX-like syntax but with functions
  • Easy to write and declarative interface
  • Minimalistic Virtual DOM just under 3 kB

Here's an example counter app.

<!DOCTYPE html>
<html lang="en">
  <head>
    <script type="module">
      import Archway, {
        useState,
      } from "https://unpkg.com/archway-framework@latest?module";
      import jsh, {
        div,
        button,
        h1,
      } from "https://unpkg.com/@archway/jsh@latest?module";

      const Counter = () => {
        const component = (props) => {
          let [count, setCount] = useState(1);

          return div(
            {},
            h1({}, `Count: ${count}`),
            button({ onClick: () => setCount((c) => c + 1) }, "Click Me")
          );
        };

        return jsh(component)();
      };

      Archway.render(Counter({}), document.getElementById("root"));
    </script>
  </head>
  <body>
    <div id="root"></div>
  </body>
</html>

Installation

npm i archway-framework

You can use Archway with a module bundler like Webpack to import it into your application. Alternatively, include Archway with a script tag with a module type.

<script type="module">
  import Archway, {
    useState,
  } from "https://unpkg.com/archway-framework@latest?module";
</script>
1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.3

5 years ago

1.0.0

5 years ago