npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rc-extended

v0.0.14

Published

Cybernetically enhanced React components

Downloads

788

Readme

rc-extended

Cybernetically enhanced Components and Hooks for React

Version License

Elevate Your React Game

rc-extended isn't just your average React library. It's a turbocharged toolkit for React development that takes your coding experience to the next level.

Unleash the Superpowers

With rc-extended, you get more than just syntax sugar. We're talking about a plethora of features designed to supercharge your React projects.

Awaiting Promises in Markup 🚀

<Await promiseFn={buyRing}>
  <DateComponent />
</Await>

Where DateComponent is a child component using the usePromiseData hook:

import { usePromiseData } from 'rc-extended';

function DateComponent() {
  const { isPending, isFulfilled, isRejected, result, error } = usePromiseData();

  return (
    <div>
      {isPending && <p>Loading...</p>}
      {isFulfilled && <p>Data: {result}</p>}
      {isRejected && <p>Error: {error.message}</p>}
    </div>
  );
}

No more promises left hanging! The Await component lets you resolve promises directly in your markup. Say goodbye to callback hell.

Looping with Ease 🔄

import { For } from "rc-extended"
import { signal } from "rc-extended/store"

const fruits = signal(['Apple', 'Banana', 'Orange', 'Grapes']);

// $each is used to signify that the prop value is a signal
<For $each={fruits}>
  {(fruit, i) => (
    <div key={i}>{item}</div>
  )}
</For>

Meet For, your loop master. It effortlessly loops over arrays and objects, sending data to children while handling replication automatically. Say hello to cleaner and more efficient rendering.

Control Flow with Style 🎮

<Switch fallback={<div>No condition matched</div>}>
  <Match when={condition1}>
    <div>Content for Condition 1</div>
  </Match>
  <Match when={condition2}>
    <div>Content for Condition 2</div>
  </Match>
</Switch>

We introduce Switch and Match components, inspired by SolidJS. Control flow in JSX, like you've never seen before. It's like JavaScript switch case, but with a JSX twist.

Asynchronous Component Resolution 🌐

Behold, the impossible made possible! The Resolve component resolves asynchronous client components. Your mind will be blown.

And So Much More... 💥

rc-extended is a treasure trove of features waiting to be discovered. We're talking supercharged hooks like useAsync, useFetch, and useTimeout. Our helpers like sleep and setReturn do the heavy lifting so you can code smarter, not harder.

Getting Started

Ready to experience the next level of React development? It's as easy as:

npm install rc-extended
# or
yarn add rc-extended

Dive into the rc-extended Documentation to explore the full potential of this powerhouse library. Be prepared to uncover even more features that will revolutionize your React projects.

Contribution Friendly

Feel like contributing your own superpowers to rc-extended? Check out our Contribution Guidelines to get started.

License

rc-extended is open-source and licensed under the MIT License.

Elevate Your React Development with rc-extended

Don't wait! Get started today and discover the new heights you can reach with rc-extended.