diff --git a/local-component/README.md b/local-component/README.md index 4865bd51..fc6415f8 100644 --- a/local-component/README.md +++ b/local-component/README.md @@ -3,5 +3,5 @@ This example shows how to create a React component in a JS file along with a Reflex wrapper in python that allows its use in a Reflex app. -The custom component is `local_component/hello.js` and is a standard React +The custom component is `local_component/hello.jsx` and is a standard React component that displays a greeting with some additional functionality. diff --git a/local-component/local_component/hello.js b/local-component/local_component/hello.jsx similarity index 100% rename from local-component/local_component/hello.js rename to local-component/local_component/hello.jsx diff --git a/local-component/local_component/hello.py b/local-component/local_component/hello.py index 4086f29b..2cff4f79 100644 --- a/local-component/local_component/hello.py +++ b/local-component/local_component/hello.py @@ -8,7 +8,7 @@ # Defining the asset with a module-relative path will result in copying the # file into a subdir of the .web/public directory -component_asset = rx.asset(path="hello.js", shared=True) +component_asset = rx.asset(path="hello.jsx", shared=True) class Hello(Div):