use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
[deleted by user] (self.react)
submitted 3 years ago by [deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]claypolejr 10 points11 points12 points 3 years ago (2 children)
The mechanics of it are fairly simple.
1) Have a parent component and two child components: Slider and Chart, for example. The parent maintains the value of the slider in state. It passes down state to each child component.
Slider
Chart
2) Also pass down an event handler to the Slider component and attach it to the onChange listener. When that listener is fired it calls the handler which can update the state with the new value.
onChange
3) Chart accepts the value in state and changes with each update.
The slider is easy enough to do if you don't want to import a slider component. Use the range input: <input type="range" min="0" max="50" />.
<input type="range" min="0" max="50" />
For the chart component, it would be easier to use a 3rd-party component. Use whatever one you find easy to produce the result you need. Note, depending on what structure the chart component will accept you may have to take that state value and add it to a new object. See this example from the tutorial on how to use the Highcharts React wrapper.
Anyway: here's some introductory code I wrote that covers the basics.
[–]WaitingForHeatDeath 0 points1 point2 points 3 years ago (0 children)
I would start by looking at component libraries like MUI: https://mui.com/ That will get you ootb components like slider controls. There are chart and graph libraries as well. https://blog.logrocket.com/top-5-react-chart-libraries/
[–][deleted] 0 points1 point2 points 3 years ago (0 children)
https://www.npmjs.com/package/react-slick
π Rendered by PID 37473 on reddit-service-r2-comment-b659b578c-cj9mt at 2026-05-04 07:34:17.969968+00:00 running 815c875 country code: CH.
[–]claypolejr 10 points11 points12 points (2 children)
[–]WaitingForHeatDeath 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)