import * as React from 'react' ; import { createSource , UIDProps , source } from "./context" ; import { UID } from "./UIDComponent" ; interface WithPrefix { prefix ? : string ; } param { String } prefix example see https export const UIDReset = ( { children , prefix = '' } ) => ( < source . Provider value = { createSource ( prefix ) } > { children } < /source.Provider>); see https export const UIDFork = ( { children , prefix = '' } ) => ( < UIDConsumer > { ( id ) => ( < source . Provider value = { createSource ( id + '-' + prefix ) } > { children } < /source.Provider>)} < /UIDConsumer>); /**
 * UID in form of renderProps. Supports nesting and SSR. Prefer  useUID hook version if possible.
 *  see https see https example see useUID - a hook version of this component
 *  see UID - not SSR compatible version
  export const UIDConsumer = ( { name , children } ) => ( < source . Consumer > { ( value ) => ( < UID name = { name } idSource = { value } children = { children } / > ) } < /source.Consumer>);