question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Reactive constants inside control panel derived from inputs

See original GitHub issue

I think it would be nice to display a reactive value derived from the values in the control panel itself. It can leverage the get hook used in the render option already.

Of course I can take the values and display the computed value in a div somewhere, but it would be nice to contain the computed value to the control panel since the values are related.

Technically it’s not an input, more like an embellishment to the control panel.

Example:

const { width, height, depth, volume } = useControls({
  width: {
    value: 1,
    min: 1,
    max: 10,
    step: 1,
  },
  height: {
    value: 1,
    min: 1,
    max: 6,
    step: 1,
  },
  depth: {
    value: 1,
    min: 1,
    max: 10,
    step: 1,
  },
  volume: {
    derivedValue: (get) => get('width') * get('height') * get('depth'),
  },
});

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Amar-Gillcommented, Jul 26, 2022

Hey if you think it’s a valuable feature I will give it a shot @gsimone – I can find time beginning in September.

Wanted to see if others will find it useful before jumping in.

0reactions
gsimonecommented, Jul 14, 2022

Do you want to attempt a contribution for this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Web on Reactive Stack - Spring
This part of the documentation covers support for reactive-stack web applications built on a Reactive Streams API to run on non-blocking ...
Read more >
A Simple Guide to Reactive Java with Spring Webflux - Split
In this tutorial, you will create a reactive web service using Spring Boot and Spring Webflux, with a little help from Spring Initializr...
Read more >
Writing REST Services with RESTEasy Reactive - Quarkus
Controlling HTTP Caching features​​ RESTEasy Reactive provides the @Cache and @NoCache annotations to facilitate handling HTTP caching semantics, ...
Read more >
Advanced Svelte: Reactivity, lifecycle, accessibility
In this article we will add the app's final features and further componentize our app. We will learn how to deal with reactivity...
Read more >
How to find the invalid controls in Angular(v2 onwards ...
Just input the top level formGroup and it will return all the FormControls that are invalid. You can possibly skim some of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found