Some critics of Genesis have noted that there is difficulty in understanding how Hezron and Hamul are considered part of the sojourning group into Egypt from the land of Canaan, when many notice that there is only 22 years for Judah to have grandchildren after Joseph's sale into slavery and also prior to Jacob's travellings to Egypt to see Joseph
In order to understand this difficulty, there are those who place the marriage of Judah to Shuah prior to the selling of Joseph to the Ishmaelite/Mdianites.
The following quotation is from the Puplit Bible Commentary:
The date of Judah's marriage has been placed before the sale of Joseph (Augustine, Aben Ezra, Rosenmüller, Drechsler, Baumgarten, Gerlach, Ainsworth, Candlish, Murphy, Inglis); but even on this assumption the task is arduous to make the birth of Hezron and Hamul occur before the emigration of their great-grandfather to Egypt. For as Judah was not more than four years older than Joseph (cf. Genesis 29:35 with Genesis 30:25), his age at the time of Joseph's sale could not have been more than twenty-one. But placing Judah's marriage at the earliest possible date, viz., in his fifteenth year, only substitutes an interval of twenty-eight years instead of one of twenty-two, in which Judah's son Er must be born, grow up to manhood, (say at fifteen) marry, die, and leave his widow Tamar, who, after marrying with Onan and waiting for Shelah (which would consume at least another year), must become the mother of twin sons by her father-in-law (for which another year would be required), and must see the elder of the two married at ten years of age, if his sons are to be born upon the soft of Canaan. On either hypothesis, therefore, it seems indispensable to hold that Judah's grandsons were born in Egypt; and in this case there is little gained by putting Judah's marriage earlier than Joseph s sale.
As a result to this assessment, how can anyone agree that Hezron and Hamul were part of the sojourn to Egypt when there is insufficient time for such events?