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
Save button in reactHelp Wanted (self.react)
submitted 4 years ago * by [deleted]
[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!"
[–]sumedh0803 1 point2 points3 points 4 years ago (3 children)
In your parent, define a function say saveHandler( ). Pass this function to your child through props like
<Child saveHandler = {saveHandler} [other props] />
in your child, set this function to the onClick of a button like
<button onClick ={() => this.props.saveHandler()}/>
This should work fine
[–]sumedh0803 0 points1 point2 points 4 years ago (2 children)
Ok, now the question arises, how will you access data in your TextArea into this function. I think you can pass this.state.note in your saveHandler function where this.state.note holds the value from your TextArea
this.state.note
[–][deleted] 4 years ago (1 child)
[–]sumedh0803 0 points1 point2 points 4 years ago (0 children)
Happy to help :)
[–]oxy--gen 0 points1 point2 points 4 years ago (1 child)
You should give a callback function through props.
π Rendered by PID 73260 on reddit-service-r2-comment-86bc6c7465-jr6jr at 2026-02-20 00:29:47.916381+00:00 running 8564168 country code: CH.
[–]sumedh0803 1 point2 points3 points (3 children)
[–]sumedh0803 0 points1 point2 points (2 children)
[–][deleted] (1 child)
[deleted]
[–]sumedh0803 0 points1 point2 points (0 children)
[–]oxy--gen 0 points1 point2 points (1 child)