Code Monkey home page Code Monkey logo

apip.js's Introduction

apip.js logo

apip.js - A Minimalistic JSX-DOM Renderer

Description

apip.js is a minimalistic JavaScript library designed for rendering UI components using JSX syntax without the overhead of React. It provides a straightforward and lightweight approach to create DOM elements and manage UI rendering, offering an alternative for those who wish to leverage the expressive power of JSX for small projects or for learning purposes. With apip.js, you can define components, handle events, and update the DOM, all within a lean and intuitive API.

Features

  • JSX syntax: Write your UI code in a declarative syntax that's comfortable and familiar.
  • No virtual DOM: Directly manipulate the DOM for fine control and less overhead.
  • Component-based: Encapsulate UI logic and state in reusable components.
  • Event handling: Attach events in a straightforward manner with JSX.
  • Lightweight: No heavy dependencies, making it ideal for small to medium-sized projects.

Getting Started

To get started with apip.js, you can include it in your HTML file directly:

<script src="./apip.min.js"></script>
<script src="https://unpkg.com/@babel/standalone"></script>

Usage

Here's a quick example to show how you might use apip.js:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Your App</title>
    <script src="./apip.min.js"></script>
    <script src="https://unpkg.com/@babel/standalone"></script>
  </head>
  <body>
    <div id="root"></div>

    <script type="text/babel">
      /** @jsx apip.createElement */

      function Header() {
        return <header className="header">This is the header</header>;
      }

      function App() {
        return (
          <div>
            <Header />
            <main className="main-content">This is the main content</main>
          </div>
        );
      }

      apip.render(<App />, document.getElementById("root"));
    </script>
  </body>
</html>

Documentation

To dive deeper and to learn more about apip.js, check out the example folder.

Contributing

We welcome contributions to apip.js! If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

License

apip.js is available under the MIT license. See the LICENSE file for more info.

Acknowledgments

Thanks to all the contributors who spend time to improve apip.js. Special thanks to the React team for the inspiration.

apip.js's People

Contributors

afifudinmtop avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.