FlatList setting getItemLayout in react-native

FlatList there is a getItemLayout method

this is how the Chinese website is introduced

getItemLayout is an optional optimization to avoid the overhead of dynamically sizing content, but only if you know the height of the content in advance. If your row height is fixed, getItemLayout is both efficient and simple to use, like this:
getItemLayout={(data, index) => (
    {length: ITEM_HEIGHT, offset: ITEM_HEIGHT * index, index}
 )}

it is necessary to know the size of the content in advance. What if the size of the content is not fixed?

my idea is to get it through the onLayout method, but I don"t know if it is similar to the "need to know the height of the content in advance" mentioned above, because at this time the content and rendering

is there any good solution?

Is

solved? onLayout cannot solve it. Flatlist and SectionList do not render all nodes at once, and onLayout methods are not executed if they are not rendered. You may need to calculate where you need to scroll, using scrollTo to scroll

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e66325-45b77.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e66325-45b77.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?