This repo contains below.
./template
.
streamlit-component-lib-react-hooks
npm package, which provides React-Hooks style API for Streamlit Component: ./streamlit-component-lib-react-hooks
.
./template
do not have to see it.$ cd template
$ python3 -m venv venv # create venv
$ . venv/bin/activate # activate venv
$ pip install streamlit # install streamlit
$ cd template/my_component/frontend
$ yarn # Install npm dependencies. `npm install` can be used instead.
$ yarn start # Start the Webpack dev server. `npm run start` can be used intead.
$ cd template
$ . venv/bin/activate # activate the venv you created earlier
$ streamlit run my_component/__init__.py # run the example
my_component/frontend/src/MyComponent.tsx
.my_component/__init__.py
.