Skip to main content

Documentation Index

Fetch the complete documentation index at: https://bym.lonestill.uk/llms.txt

Use this file to discover all available pages before exploring further.

YM может использовать нестандартную сборку React. Если getFiber возвращает null — версия YM не оставляет стандартные __reactFiber* ключи на DOM-узлах.

Методы

api.React.getFiber(element)             // → Fiber | null
api.React.getProps(element)             // → object | null
api.React.getState(element)             // → object | null
api.React.getOwner(element)             // → component instance | null
api.React.findFiber(element, predicate) // → Fiber | null
api.React.forceUpdate(element)          // перерисовать component

Пример

const btn   = document.querySelector('[class*="LikeButton"]');
const props = api.React.getProps(btn);
// { onClick: f, isLiked: true, trackId: '123', ... }

// Найти fiber с нужным prop
const fiber = api.React.findFiber(btn, f => f.memoizedProps?.trackId);