Skip to content

pret.render

make_create_element_from_function [source]

Turn a Python Pret function into function that creates a React element.

Parameters

PARAMETER DESCRIPTION
fn

The Python function to turn into a React element creator, ie a function that when invoked by React, will call the Python function with the correct arguments.

RETURNS DESCRIPTION
(**props) -> ReactElement<fn

component [source]

Decorator to turn a Python function into a Pret component, that will be rendered by React.

Parameters

PARAMETER DESCRIPTION
fn

TYPE: Callable