All Projects → Paol-imi → React Reparenting

Paol-imi / React Reparenting

Licence: mit
The reparenting tools for React

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to React Reparenting

safenetwork-gitportal
p2p git portal - a decentralised alternative to github
Stars: ✭ 12 (-96.92%)
Mutual labels:  portal
Opensource Portal
Microsoft's monolithic GitHub Management Portal enabling enterprise scale self-service powered by the GitHub API 🏔🧑‍💻🧰
Stars: ✭ 273 (-30%)
Mutual labels:  portal
Ngx Planet
🚀🌍🚀A powerful, reliable, fully-featured and production ready Micro Frontend library for Angular.
Stars: ✭ 361 (-7.44%)
Mutual labels:  portal
alist fiber
一款基于go+vue的阿里云盘项目 https://pan.baiyue.one
Stars: ✭ 53 (-86.41%)
Mutual labels:  fiber
Kupiki Hotspot Script
Create automatically a full Wifi Hotspot on Raspberry Pi including a Captive Portal
Stars: ✭ 265 (-32.05%)
Mutual labels:  portal
Xxl Tool
a series of tools that make Java development more efficient.(Java工具类库XXL-TOOL)
Stars: ✭ 311 (-20.26%)
Mutual labels:  fiber
go-rest-api-with-fiber
A Go Fiber API
Stars: ✭ 31 (-92.05%)
Mutual labels:  fiber
Single Spa Portal Example
Example project on how to combine multiple SPA's on a single Website
Stars: ✭ 376 (-3.59%)
Mutual labels:  portal
Fibjs
JavaScript on Fiber (built on Chrome's V8 JavaScript engine)
Stars: ✭ 2,880 (+638.46%)
Mutual labels:  fiber
React Particles Webgl
🔆 A 2D/3D particle library built on React, Three.js and WebGL
Stars: ✭ 330 (-15.38%)
Mutual labels:  fiber
gorails
gorails website
Stars: ✭ 34 (-91.28%)
Mutual labels:  portal
fiber-boilerplate
This is the go boilerplate on the top of fiber web framework. With simple setup you can use many features out of the box
Stars: ✭ 184 (-52.82%)
Mutual labels:  fiber
Portal Vue
A feature-rich Portal Plugin for Vue 2, for rendering DOM outside of a component, anywhere in your app or the entire document.
Stars: ✭ 3,490 (+794.87%)
Mutual labels:  portal
squest
Service request portal on top of Ansible Tower/AWX
Stars: ✭ 115 (-70.51%)
Mutual labels:  portal
Wedatasphere
WeDataSphere is a financial level one-stop open-source suitcase for big data platforms. Currently the source code of Scriptis and Linkis has already been released to the open-source community. WeDataSphere, Big Data Made Easy!
Stars: ✭ 372 (-4.62%)
Mutual labels:  portal
react-portal-hoc
A stupid HOC to make a stupid portal so you can make stupid modals
Stars: ✭ 14 (-96.41%)
Mutual labels:  portal
Realize
A React component tree visualizer
Stars: ✭ 285 (-26.92%)
Mutual labels:  fiber
React Dev Inspector
This package allows users to jump to local IDE code directly from browser React component by just a simple click
Stars: ✭ 372 (-4.62%)
Mutual labels:  fiber
Toughradius
Beautiful open source RadiusServer
Stars: ✭ 376 (-3.59%)
Mutual labels:  portal
Vertx Zero
Zero Framework:http://www.vertxup.cn
Stars: ✭ 320 (-17.95%)
Mutual labels:  fiber



Simple, intuitive and configurable tools to manage reparenting with React

npm React: Tools Circle Ci Codecov Code style: Prettier Types: Typescript

What does it do? 🤨

Imagine that you have two Parent components, both with some Child components. To transfer a Child from one Parent to another, the components must be re-rendered with that Child in its new Parent. This procedure has obvious usability and performance limits, the transferred component is unmounted, re-mounted and loses its internal state, as well as all the nodes it has generated (such as a <div>).

React does not yet offer specific APIs to solve this problem, in many cases we try to deal with it using Portals and refs. This approach presents other problems, it is difficult to implement for large-scale apps and above all it does not give the feeling of being very "Reactive". In fact, portals have been designed for other purposes, citing the documentation:

Portals provide a first-class way to render children into a DOM node that exists outside the DOM hierarchy of the parent component.

This process is more related to the DOM, at "React level" the Child is still part of the same Parent. This is where React-reparenting intervenes.

This package offers easy and intuitive tools to solve this problem. With a few lines of code you will be able to transfer your components, without them being re-mounted or losing their internal state.

⚠️ This is an experimental technology that interacts with React internals, you shouldn't rely on them in your production code. The React team could introduce breaking changes in future releases without following the semver rules.

Documentation 📖

You can find the full documentation here.

Examples 💡

Check out the examples available on Codesandbox.

License ©

Copyright © 2020 Paolo LongoMIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].