DEV Community

Cover image for How to store value from textarea in a global state? With React Hooks and the Context API ?
ivkeMilioner
ivkeMilioner

Posted on • Edited on

How to store value from textarea in a global state? With React Hooks and the Context API ?

I want to use text from textarea in few functions,
that function must be in separate files. After functions convert text I want to write new text in the same textarea. I did it with JS but in react it is very difficult for me. Can you help me?

https://codesandbox.io/s/ucirl-forked-xdhbk

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post