171
rated 0 times
[
176]
[
5]
/ answers: 1 / hits: 185598
/ 9 Years ago, tue, january 19, 2016, 12:00:00
I have a React component
export default class Archive extends React.Component {
...
}
componentDidMount
and onClick
methods partially use the same code, except for slight change in parameters.
Is it possible to create a function inside the component class so it can be reused in the scope of the component?
More From » reactjs