File size: 343 Bytes
5144199
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
'use client';

import { shallow, useSelector } from "@tanstack/react-store";

//#region src/Subscribe.ts
function Subscribe(props) {
	const selected = useSelector(props.source, props.selector, { compare: shallow });
	return typeof props.children === "function" ? props.children(selected) : props.children;
}

//#endregion
export { Subscribe };