New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rc-extended

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-extended

Cybernetically enhanced React components

latest
Source
npmnpm
Version
0.0.14
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

react

FAQs

Package last updated on 19 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts