I
I
Ibishka2020-09-06 12:37:53
React
Ibishka, 2020-09-06 12:37:53

How to write your own function and use React js everywhere?

For example, I have an input and there is an onBlur function for it. I don’t want to separately create a component for the input, but only hang each input where the onBlur function is needed, but where to write and how to import it in order to use it. I write components as classes, sometimes I also write functions.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Makarov, 2020-09-06
@Ibishka

create a folder fnc there write a function import it and use it where necessary

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question