Skip to content

Conversation

@Gotfrid
Copy link

@Gotfrid Gotfrid commented May 15, 2024

Make it possible to pass props to a React component from Python code.

Component properties are defined in Python, serialized to a dictionary, and sent to the DOM via data-props HTML attribute.

makeReactInput function receives those props, parses and sends them further to the React component. This is possible thanks to a second generic parameter which defines the shape of the props.

To showcase this new feature, the demo-pkg code is updated accordingly.

Component properties are defined in Python, serialized to a dictionary,
and sent to the DOM via `data-props` HTML attribute.

`makeReactInput` function receives those props, parses and sends
them further to the React component. This is possible thanks
to a second generic parameter which defines the shape of the props.

To showcase this new feature, the `demo-pkg` code is updated
accordingly.
@Gotfrid Gotfrid changed the title feat: ability to pass props to a custom react component feat: ability to pass props to the react component May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant