https://github.com/JohnCoene/js-shiny
Example of using JavaScript to solve shiny dynamic input hell
https://github.com/JohnCoene/js-shiny
Last synced: 3 months ago
JSON representation
Example of using JavaScript to solve shiny dynamic input hell
- Host: GitHub
- URL: https://github.com/JohnCoene/js-shiny
- Owner: JohnCoene
- Created: 2022-01-15T10:14:19.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-02-25T16:01:53.000Z (over 3 years ago)
- Last Synced: 2025-04-19T07:58:22.342Z (6 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 10
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - JohnCoene/js-shiny - Example of using JavaScript to solve shiny dynamic input hell (JavaScript)
README
# JS Shiny
[video](https://www.youtube.com/watch?v=EuIJS5t5g3M&) walking
through building the app.This is a pattern I very commonly use for dynamic inputs
in Shiny.
This is admitedly a simplified MRE but the gist is there.The premises is, I do not know at development time how
many inputs I have to handle because I need to interact
with highly dynamic (and often nested) data.
Data structure fluctuates.Dynamic inputs in shiny are a pain: simply use JavaScript.
1. Send the data to the front-end to render the inputs
2. On change capture changes__Advantages__
Better, clearer, more performant, etc.
Notice there is no reactive madness in the back-end.
In fact, no reactivity at all (in this simple example)
You do no need a reactive to hold the data: what is on screen
is in sync with what is in the back-end/database.Some comments in the JavaScript code.