K
K
Konstantin Bozhkov2017-08-18 23:05:50
JavaScript
Konstantin Bozhkov, 2017-08-18 23:05:50

Should a function that returns a component be capitalized?

For example, I have a module that returns a function in which I want to set this via bind
, but what would be the correct name for this module, with a capital or small letter?

export default function () {
  return <span onClick={this.handler}>Example</span
}

Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Negwereth, 2017-08-18
@ybiks

And here this will not be your component, since this is a stateless component, in the form of a pure function.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question