Skip to content

Conversation

@Archmonger
Copy link
Contributor

@Archmonger Archmonger commented Dec 15, 2025

Description

  • JavaScript components will now automagically use ReactPy's internal version of ReactJS, even if the user forgot to call import_reactjs within html.head(...). As a result, this adds a few improvements:
    • Components from component_from_npm can now piggy-back on ReactPy's internal ReactJS export to prevent bugs caused by ReactJS version mismatches.
    • Components from component_from_file and component_from_string no longer need to be compiled/built by the user (with vite, webpack, rollup, etc) if they only use the following imports: react, react-dom, react-dom/client, and react/jsx-runtime.
  • Changes to test suite, fixtures, and tooling to allow pytest to run in parallel mode (via hatch test --parallel). This reduces test runtime from ~150 seconds to ~20 seconds on local machines.
  • Fix bug where ReactJS components from component_from_npm could generate a ReactDOM.createRoot was called on existing root warning.
  • Move reactpy.pyscript code into reactpy.executors.pyscript

Checklist

Please update this checklist as you complete each item:

  • Tests have been developed for bug fixes or new functionality.
  • The changelog has been updated, if necessary.
  • Documentation has been updated, if necessary.
  • GitHub Issues closed by this PR have been linked.

By submitting this pull request I agree that all contributions comply with this project's open source license(s).

@Archmonger Archmonger marked this pull request as ready for review December 15, 2025 10:21
@Archmonger Archmonger merged commit 9e31735 into reactive-python:main Dec 15, 2025
20 checks passed
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