Relative Content

Tag Archive for reactjsnext.jstrpct3

Error when returning children in nextjs server component

“use client”; — Some imports and interfaces const SubscriptionDataFetcher: React.FC<SubscriptionDataFetcherProps> = ({ children }) => { const [data, setData] = useState<SubscriptionData>({}); — Some functions return <>{children(data)}</>; }; export default SubscriptionDataFetcher; i have this app that needs to call a trpc route, and i have decided to call it like that and return the children to […]