Catalog npm
Back to packageRELEASE DETAILS

0.0.10

npm

@-ft/react-portal

The real React Portal, not a ReactDOM Portal

Published5 Jun 2024
Direct dependencies2
Transitive dependenciesNot calculated

README

Current package documentation

react-portal - The real React Portal, not a ReactDOM Portal

Inject React node into any position in React tree.

Usage

import { usePortal } from '@-ft/react-portal';

function MyPage({ children }) {
  const { append, PortalOut } = usePortal();

  return (
    <Layout>
      <SomeOtherComponent>
        <MyComponent append={append} />
      </SomeOtherComponent>
      <PortalOut />
    </Layout>
  );
}

function MyComponent({ append }) {
  return (
    <PortalIn append={append}>
      <DirectBottomOfLayout />
    </PortalIn>
  );
}

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 2

Native requirements
2 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@-ft/watch-target-react
Environment
{
  "local_name": "@-ft/watch-target-react",
  "alias": false,
  "peer_metadata": null
}
^0.0.9runtime
react
Environment
{
  "local_name": "react",
  "alias": false,
  "peer_metadata": null
}
^18.2.0peer

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-lS6rbtN3PPwFGc5xywPAaMH+nQs5IcYFz74ELPTPawJUdgST+KAJa7+Wv2olEdy/ZtK9SpK7bOxP81dAwmWyLw==",
  "shasum": "1dfe0565a8e1effdea134b79c7ea8a1027ac3a6e",
  "tarball": "https://registry.npmjs.org/@-ft/react-portal/-/react-portal-0.0.10.tgz",
  "fileCount": 4,
  "unpackedSize": 3189,
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIQDJdJCTExtYT2dQ1J/NCxT5cg3PRDNE3i+LtvGAqwDJEAIgBUVu7fnUuvJM0m7GGDq18Wu+VloUc3YmNgbw3oZy6YE="
    }
  ]
}

Repository

PENDING
42ts/-ft-react-portal

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:49 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:11346e75edb2c1672d28de43f984ac9ff542d8f76c5efc41d13765b6d7dff404

Other collected versions

0.0.94 JunView all collected versions →