api

Node Traversal

Node traversal is a great way to link or get content, such as meta, from other nodes.

Using resolveNode

import { resolveNode } from '@roxi/routify'

const aParentNode = resolveNode('..')
const aSiblingNode = resolveNode('../sibling')
const aChildNode = resolveNode('./child')

Should we resolve sibling nodes through ../path or ./path?

Using node tree

import { context } from '@roxi/routify'

const aSiblingNode = $context.node.parent.children.example



Need a developer? Hire me!