getAllNodes()
이 Hook은 현재 버전 내에 있는 모든 노드들의 정보를 배열 형태로 반환합니다.
Example
import { useRef } from "react";
import { Palito } from "../palito/Palito.jsx";
const ExamplePage = () => {
const palitoRef = useRef(null);
const LICENSE_KEY = "key-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
const handleGetData = () => {
if (palitoRef.current) {
const allNodes = palitoRef.current.getAllNodes();
console.log("--- Palito Library Data ---");
console.log("Current Zone Node:", allNodes);
}
};
return (
<div>
<Palito ref={palitoRef} licenseKey={LICENSE_KEY} />
<div
style={{
position: "absolute",
bottom: "40px",
right: "20px",
zIndex: 1000,
}}
>
<button
onClick={handleGetData}
style={{ padding: "10px 20px", fontSize: "16px" }}
>
Get Data from Library
</button>
</div>
</div>
);
};
export default ExamplePage;
예제 출력 예시

Props
이 Hook은 props를 받지 않습니다.
| 이름 | 유형 | 설명 | 기본값 |
|---|---|---|---|
| (없음) | - | - | - |
Return
Node[]