Skip to content

Conversation

vlats05
Copy link
Contributor

@vlats05 vlats05 commented Apr 21, 2023

close #983

@vercel
Copy link

vercel bot commented Apr 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
table ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2023 2:41pm

@yoyo837
Copy link
Member

yoyo837 commented Apr 21, 2023

Why it can resolve Maximum call stack size exceeded error?

@codecov
Copy link

codecov bot commented Apr 21, 2023

Codecov Report

Merging #984 (5730ec7) into master (a099306) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 5730ec7 differs from pull request most recent head 3813de3. Consider uploading reports for the commit 3813de3 to get more accurate results

@@           Coverage Diff           @@
##           master     #984   +/-   ##
=======================================
  Coverage   99.49%   99.49%           
=======================================
  Files          36       36           
  Lines         989      989           
  Branches      320      320           
=======================================
  Hits          984      984           
  Misses          5        5           
Impacted Files Coverage Δ
src/hooks/useFlattenRecords.ts 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@vlats05
Copy link
Contributor Author

vlats05 commented Apr 22, 2023

@yoyo837
actually max number of elements in array.push depends on many things, including javascript engine and browser version, optimizations etc.
Also there are many topics describing the same issue:
nodejs/node#27732
https://stackoverflow.com/questions/42263108/why-does-apply-with-too-many-arguments-throw-maximum-call-stack-size-exceeded

Made a simple example on codesandbox:
https://codesandbox.io/s/determined-gates-dkku0x

@vlats05
Copy link
Contributor Author

vlats05 commented May 9, 2023

@yoyo837 Can you merge it? I don't have write permissions.

@yoyo837 yoyo837 merged commit 38a9e02 into react-component:master May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] useFlattenRecords throws "Maximum call stack size exceeded error"
2 participants