Socket
Socket
Sign inDemoInstall

react-dom-super-render

Package Overview
Dependencies
8
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-dom-super-render

enhance ReactDom.render method


Version published
Maintainers
1
Install size
8.69 kB
Created

Readme

Source

react-dom-super-render

enhance ReactDom.render method

NPM JavaScript Style Guide

Install

npm install --save react-dom-super-render

Usage

index.html

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="theme-color" content="#000000">

    <link rel="manifest" href="%PUBLIC_URL%/manifest.json">

    <title>react-dom-super-render</title>
  </head>

  <body>
    <noscript>
      You need to enable JavaScript to run this app.
    </noscript>
    <div id="root"></div>
  </body>
</html>

index.js

import React from 'react'
import ReactDOM from 'react-dom'
import App from './App'

import ReactDomRender from 'react-dom-super-render'

//second argument is enum
//type secondArg = "before" | "after" | "append" | "prepend" | "replaceWith"; 
//default value "replaceWith"
const superRender = ReactDomRender(ReactDOM.render,'replaceWith')

superRender(<App />, root)

License

MIT © https://github.com/bowen31337

FAQs

Last updated on 26 Feb 2020

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc