Answer the question
In order to leave comments, you need to log in
How to run Link from React-router-dom in a function?
I need to create a table lookup. When entering text into the input text field, a request must be made to the server and the data corresponding to the request must be returned. I want to implement this with React-Router. The idea is the following: I write text in a field, get data from the field using event.target.value, then I want to add the resulting value to <Link to="api/document/${event.target.value}">
. But I don't know how to run <Link to="api/document/${event.target.value}">
from some function.
Let me know if you have any ideas about this.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question