barbone,

Reminder (to myself): reactive objects can return functions, which use other reactive object inside of them

grrrck,
@grrrck@fosstodon.org avatar

@barbone Yes! @jonthegeek and I were just talking about this last week. It's super helpful!

https://fosstodon.org/@grrrck/111386156050820277

jonthegeek,
@jonthegeek@fosstodon.org avatar

@grrrck @barbone I hadn't fully wrapped my mind around this particular option! No matter how much I dig into shiny, there's always something left that I hadn't thought of 🙃

barbone,

@grrrck @jonthegeek It's good enough to look past the slightly weird syntax: my_reactive()(x = 1)

jonthegeek,
@jonthegeek@fosstodon.org avatar

@barbone @grrrck oh ha that's right, I HAVE done this! The syntax triggered some old memories 🤣

grrrck,
@grrrck@fosstodon.org avatar

@jonthegeek @barbone ooh try this:

# inside a module  
my_internal_reactive <- reactive(0)

return(  
 list(  
 update_internal = function(x) {  
 my_internal_reactive(x)  
 }  
 )  
)  
  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • modclub
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • everett
  • InstantRegret
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • anitta
  • kavyap
  • GTA5RPClips
  • cubers
  • JUstTest
  • osvaldo12
  • tacticalgear
  • Durango
  • khanakhh
  • ngwrru68w68
  • provamag3
  • Leos
  • tester
  • cisconetworking
  • ethstaker
  • megavids
  • normalnudes
  • lostlight
  • All magazines