Feature Request: Reactive constants inside control panel derived from inputs
See original GitHub issueI 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:
- Created a year ago
- Comments:5 (1 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
Do you want to attempt a contribution for this?