npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@reunionpage/react-family-tree

v0.1.0

Published

ReunionPage is an interactive in-browser family tree renderer that allows you to build, edit, and explore family trees, written in React.

Readme

ReunionPage Family Tree Renderer

ReunionPage is an interactive in-browser family tree renderer that allows you to build, edit, and explore family trees, written in React.

Demo

https://family-tree-demo.arw9234.net

Disclaimer

This project is in early development and a work in progress. Don't expect it to be stable yet or for all features to work correctly.

This project is currently in major version 0. I will try to avoid making backwards-incompatible changes while in this version but will not guarantee as such. The codebase, API, features, and visuals of this component are subject to change. I will bump the project to version 1.0.0 once it is in a state I consider stable.

Features

  • Fully interactive with pan/zoom, recenter/rebuild on different nodes
  • Editable
  • Supports complex relationships including multiple spouses, half siblings, step siblings, etc.
  • Keyboard accessible

Install

For React projects:

npm install @reunionpage/react-family-tree

Basic Usage

Import the component (in a React project) and use:

import { FamilyTree } from "@reunionpage/react-family-tree"

export default function App() {
    return (
        <div>
            <FamilyTree />
        </div>
    )
}

I am planning to add entrypoints/separate packages for Vue and other environments (as as web component), but as of right now only React projects can comsume this library.

Save family tree on edit

By default the family tree will be lost upon closing/reloading the page.

To save the family tree as the user makes edits, pass a callback function to the onDatabaseChange prop:

<FamilyTree
    onDatabaseChange={(database) => {
        console.log('Family tree changed: ', database)
        return new Promise((resolve, reject) => {
            // save family tree somewhere..
            resolve()
        })
    }}
/>

The function passed to onDatabaseChange accepts a database parameter, which is a JSON object representing the family tree. onDatabaseChange MUST return a promise that resolves when you are ready to handle another update event. Once onDatabaseChange is called, it will NOT be called again until the promise it returns either resolves or rejects. This allows you to do an async save operation (like posting the data to a backend API) without worrying about race conditions.

Here is an example of how you could use onDatabaseChange to post the tree to a backend API every time a change is made:

<FamilyTree
    onDatabaseChange={(database) => {
        return new Promise(async (resolve, reject) => {
            await fetch('/api/family-tree', {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json'
                },
                body: JSON.stringify(database)
            })
            resolve()
        })
    }}
/>

Here, /api/family-tree is expected to save the tree to some backing database, completely replacing the previous version.

To demonstrate how this works, consider the following series of events:

  • The user makes an edit to the family tree
  • onDatabaseChange is called and the serialized state of the tree is passed
  • Your application POSTs the tree somewhere to be saved server-side
  • The user rapidly makes 3 more edits before the previous POST completes

In this case, onDatabaseChange will not be called for the subsequent 3 edits since the promise returned from the first onDatabaseChange call has not resolved yet. If they were all fired at once, they might complete out-of-order, and you could end up not saving some of the edits.

Once the fetch call completes and the promise resolves, onDatabaseChange will immediately be called again with the most recent version of the tree. Only the most recent version will be passed to onDatabaseChange, so even though 3 edits were made while the first one was being processed, you will only be notified once.

Populate with data

Use the database prop to populate the tree with saved data (for example, data previously passed to onDatabaseChange and saved):

const database = { /* ... */ }

<FamilyTree
    database={database}
/>

TODO/Planned Features

  • Profile picture uploading
  • GEDCOM import (and export?)
  • Options to enable/disable editing and other fine tuning
  • Arbitrary metadata editing for profiles and relationships
  • Support replacing default profile nodes with custom components

Contributing

I am not accepting pull requests at this time since the project is not yet stable and the codebase is changing rapidly. However, any bug reports or feature requests are greatly appreciated and can be submitted as issues at https://github.com/arw6329/family-tree-renderer.

License

This project uses the MPL 2.0 license. You are free to use this library in larger works and release that work under a different license. You do not have to release source code for files added in larger works. If you make modifications to any of the files in this project, those modifications must be made available under the same license.