FelaRenderer
Note: If you're working with React > 16.3, we highly recommend using the useFela hook instead.
It's more easy and safe to use and also has the best rendering performance.
FelaRenderer is a consumer component leveraging the render-props pattern. It can be used to access the renderer object that is passed down via React's context(new tab) APIs by a RendererProvider.
Props
Property | Type | Description |
---|---|---|
children | Function | A render function that receives the renderer object as its first parameter. |
Imports
import { FelaRenderer } from 'react-fela'import { FelaRenderer } from 'preact-fela'import { FelaRenderer } from 'inferno-fela'
Example
<FelaRenderer> {renderer => ( // do something with the renderer )}</FelaRenderer>