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

aotoo-react-treex

v1.0.15

Published

react tree component that based on the aotoo

Readme

aotoo-react-treex

Install

// install
yarn add aotoo-react-treex

USAGE

Depends on aotoo this library, Aotoo is a global variable

import Aotoo from 'aotoo'
import treex from 'aotoo-react-treex'

const _data = [ 
  {title: '', idf: 'aaa'},
  {title: 'abcfd', parent: 'aaa' },
  {title: 'bcasd', parent: 'aaa' },
  {title: 'aacwq', parent: 'aaa'},

  {title: <button>123</button>, idf: 'bbb'},
  {title: 'yyufs', parent: 'bbb'},
  {title: 'xfdsw', parent: 'bbb'},
  {title: 'xxxdsehh', parent: 'bbb'}, 
]

const treeList = treex({ data: _data })

// Render in the dom of the specified id  
treeList.render(id, function(dom){
  // dom => ul.li
  $(dom) ...
})

// ========  or 

treeList.rendered = function(dom){
  $(dom) ...
}
const box = (
  <div>
    {treeList.render()}
    <button>button</button>
  </div>
)

Aotoo.render(box, id)

API

$update(opts)

// after `treeList.render(id)`,You can dynamically update the structure after you update the data(_data)

treeList.$update({
  index: 1,
  data: {title: 'hello world', parent: 'aaa' }
})

// ======== or 

treeList.$update({
  data: [
    {title: 'one'},
    ...
  ]
})

The above operation causes the structure to be re-rendered and the callback method rendered is executed again

$append(opts)

// after `treeList.render(id)`

treeList.$append({
  data: {title: 'hello world', parent: 'aaa' }
})

// ======== or 

treeList.$append({
  data: [
    {title: 'one'},
    ...
  ]
})

access the above operation, you can dynamically append the structure after you append the data(_data)

$prepend(opts)

// after `treeList.render(id)`

treeList.$prepend({
  data: {title: 'hello world', parent: 'aaa' }
})

// ======== or 

treeList.$prepend({
  data: [
    {title: 'one'},
    ...
  ]
})

access the above operation, you can dynamically prepend the structure after you prepend the data(_data)

$delete(opts)

// after `treeList.render(id)`

treeList.$delete({
  index: 1
})

// ======== or 

treeList.$delete({
  query: {title: 'abcfd'}
})

access the above operation, you can dynamically delete the structure after you delete the data(_data)

List status

$loading(opts)

// after `treeList.render(id)`

treeList.$loading({
  loading: true || jsx dom
})

access the above operation, will show loading bar

$over(opts)

// after `treeList.render(id)`

treeList.$over({
  over: true || jsx dom
})

access the above operation, will show over bar

$pulldown(opts)

// after `treeList.render(id)`

treeList.$pulldown({
  pulldown: true || jsx dom
})

access the above operation, will show pulldown bar

$trigger(opts)

// after `treeList.render(id)`

treeList.$trigger({
  trigger: true || jsx dom
})

access the above operation, will show trigger bar