Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-reconciler

Package Overview
Dependencies
Maintainers
8
Versions
1916
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-reconciler

React package for creating custom renderers.

  • 0.0.0-experimental-ed6c091fe-20210701
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1M
decreased by-55.77%
Maintainers
8
Weekly downloads
 
Created

What is react-reconciler?

The react-reconciler package is a framework for building custom React renderers. It provides the core algorithms that React uses for reconciliation, allowing developers to create their own renderers for different target environments beyond what React supports out of the box (e.g., the web or native mobile). This package is an under-the-hood tool primarily intended for advanced use cases where you need to create a custom rendering environment.

What are react-reconciler's main functionalities?

Creating a Custom Renderer

This code sample demonstrates how to start creating a custom renderer using react-reconciler. You define methods like `createInstance` for creating instances of components and `createTextInstance` for handling text. The host config object passed to `ReactReconciler` includes a variety of methods for managing instances, updates, and more.

const MyRenderer = ReactReconciler({
  now: Date.now,
  createInstance: (type, props) => {
    // Create instance of a component
  },
  createTextInstance: (text) => {
    // Create text instance
  },
  // Other host config methods...
});

Scheduling Updates

This example shows how to schedule updates to the container using your custom renderer. The `updateContainer` method is used to apply updates to the container, which in this case is a custom object you manage. This method is part of what allows React's declarative API to work with your custom rendering logic.

const container = {}; // Your container object
MyRenderer.updateContainer(<App />, container, null, () => {
  console.log('Rendered with MyRenderer');
});

Other packages similar to react-reconciler

Keywords

FAQs

Package last updated on 02 Jul 2021

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc