V
V
Vann Damm2020-02-13 17:45:34
typescript
Vann Damm, 2020-02-13 17:45:34

Why access modifiers in react-typescript?

Why access modifiers in react-typescript and in what situation can they come in handy (it is clear that if I use private, then you can’t change or read it, I can’t imagine the situation)? And after all, I don’t seem to have access to class instances?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
abberati, 2020-02-13
@abberati

And they are not needed. In React, classes are not used in the classical style, but simply to gain access to internal methods. In modern realities, we write without classes on hooks - they are perfectly typed and do not use classes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question