I study React Native faced with such a design I do not understand what it means
sectionHeaderHasChanged: (r1, r2) => r1 !== r2, I study React Native faced with such a design I do not understand what it means
sectionHeaderHasChanged: (r1, r2) => r1 !== r2, These are arrow functions.
In the "normal" form, your construction will be as follows:
function (r1, r2) { return r1 !== r2; } However, the trick here in the arrow is the transfer of context. If the function needs to refer to the parent context, then in the "unabridged" form, you will need to previously save the context in a variable, or zabindit it. In the case of an arrow function, the context inside the function can be transferred simply =>
Well, as you correctly wrote in the comments, the question is really about ES6
If you do not understand the purpose of this method, then it says that in the generation of component elements, the generation will continue until the next element of the list is equal to the previous one.
Source: https://ru.stackoverflow.com/questions/549016/
All Articles
returnforgot. Well, I think it is worth making your comment in the form of an answer. Maybe it will be useful to someone else - Dmitriy Simushev