-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReactR state and other components #32
Comments
Hi, thanks for the kind words, I'm glad you enjoy the package 😄 We don't currently support a way to do exactly this. The best you can do right now, which is not ideal because of network latency, is store an It's not efficient, but it is conceptually consistent with the rest of Shiny. So, if you can get away with that, I recommend it. Let me know if a short example would be helpful, and I'd be happy to post one. |
Hello Alan, thank you for your answer. I already "stole" the idea of passing state to reactiveValues to render stuff in the UI dynamically. That idea of React is great ;-). |
I'll try to demonstrate another way of accomplishing this on the JS side. Hope to get some time this weekend. |
@MarkusLang1987 still not a direct answer to your question, since we are using functional components rather than There are three examples:
@alandipert and @MarkusLang1987 I would love thoughts. I know this is a little convoluted. |
Hello @timelyportfolio (@MarkusLang1987 here with my professional account). Sorry for the late response, I just came home from vacation. Is there any way this will be easier in the future? I thought about using reactiveValues to manage state, but that was just my naive oppinion ;-). Anyway, I think this package and all of you guys effort can improve shiny greatly. |
@DSGYM @MarkusLang1987 Ideally, a R user would not have to learn all the React state management possibilities :) I updated the |
Yes, sure. I´m just very interested in what you are doing (which is absolutely crazy for me), so my personal intention here might differ from other Shiny/R Developers. Thanks for the update, but I´m not sure if this is a better solution, since |
I am not sure I understand. We could remove the reactiveVal and operate only on input$btnflip. Or we could pass state of flipcard as an input in Shiny. Or we could rewrite flipcard as a class instead of functional component. |
Ok I see, there are many different ways to do it. Is there any preferable way to do anything? I´m asking because I want to create my own React widgets, no just use them :-) |
@DSGYM Sorry, this has lingered for a year. Would you like to resume the conversation? I would enjoy working through state management with |
Hello,
first of all thank you for the awesome package. I love both technologies and played with it a bit.
In the documentation I found no way to pass state or child components.
I would like to use this Flip Card Component for example. It is possible to pass state? This Component also only works with Childcomponents. Is there a way to pass an Actionbutton for example?
Thank you :-)
The text was updated successfully, but these errors were encountered: