Skip to content

Commit a4a21e6

Browse files
authored
Merge pull request #312 from reflex-dev/use-jsx-for-local-component-example
use jsx for local component example
2 parents 0f80063 + 0949a35 commit a4a21e6

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

local-component/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
This example shows how to create a React component in a JS file along with a
44
Reflex wrapper in python that allows its use in a Reflex app.
55

6-
The custom component is `local_component/hello.js` and is a standard React
6+
The custom component is `local_component/hello.jsx` and is a standard React
77
component that displays a greeting with some additional functionality.

local-component/local_component/hello.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
# Defining the asset with a module-relative path will result in copying the
1010
# file into a subdir of the .web/public directory
11-
component_asset = rx.asset(path="hello.js", shared=True)
11+
component_asset = rx.asset(path="hello.jsx", shared=True)
1212

1313

1414
class Hello(Div):

0 commit comments

Comments
 (0)