Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add errorInfo and prevState parameters to getDerivedStateFromError #13986

Closed

Conversation

bisubus
Copy link

@bisubus bisubus commented Oct 26, 2018

Improves #13746 by providing getDerivedStateFromError with both error and errorInfo params that are available in componentDidCatch.
Closes #13954.

@sizebot
Copy link

sizebot commented Oct 26, 2018

Details of bundled changes.

Comparing: b5539ad...f408448

scheduler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
scheduler.development.js n/a n/a 0 B 19.17 KB 0 B 5.74 KB UMD_DEV
scheduler.production.min.js n/a n/a 0 B 3.16 KB 0 B 1.53 KB UMD_PROD

Generated by 🚫 dangerJS

@japgolly
Copy link

Hello. getDerivedStateFromError is unusable from scalajs-react until this is merged. The only way to maintain type-safety in Scala and React compatibility is to box Scala state values into single-key JS objects meaning that in Scala one can't create a partial state object but instead has to provide an endofunction or have immediate access to current state.

Is it possible to merge this PR?

@bisubus bisubus mentioned this pull request Dec 18, 2019
6 tasks
@stale
Copy link

stale bot commented Jan 10, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution.

@stale stale bot added the Resolution: Stale Automatically closed due to inactivity label Jan 10, 2020
@ljharb
Copy link
Contributor

ljharb commented Jan 10, 2020

Still relevant (stale bots are user hostile)

@stale stale bot removed the Resolution: Stale Automatically closed due to inactivity label Jan 10, 2020
@bisubus bisubus closed this Jan 15, 2020
@bisubus bisubus force-pushed the getderivedstatefromerror-state-arg branch from f408448 to bc1f3e1 Compare January 15, 2020 19:56
@bisubus bisubus reopened this Jan 15, 2020
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit bc1f3e1:

Sandbox Source
frosty-frog-diwy5 Configuration

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 622ca61:

Sandbox Source
great-water-bpkt5 Configuration

@sizebot
Copy link

sizebot commented Jan 15, 2020

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against 622ca61

@sizebot
Copy link

sizebot commented Jan 15, 2020

No significant bundle size changes to report.

Size changes (stable)

Generated by 🚫 dangerJS against 622ca61

@bisubus bisubus changed the title Add second prevState parameter to getDerivedStateFromError Add errorInfo and prevState parameters to getDerivedStateFromError Jan 15, 2020
@bisubus bisubus requested a review from bvaughn January 15, 2020 21:17
@stale
Copy link

stale bot commented Apr 14, 2020

This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.

@stale stale bot added the Resolution: Stale Automatically closed due to inactivity label Apr 14, 2020
@ljharb
Copy link
Contributor

ljharb commented Apr 14, 2020

bump

@stale stale bot removed the Resolution: Stale Automatically closed due to inactivity label Apr 14, 2020
@stale
Copy link

stale bot commented Jul 13, 2020

This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.

@stale stale bot added the Resolution: Stale Automatically closed due to inactivity label Jul 13, 2020
@ljharb
Copy link
Contributor

ljharb commented Jul 13, 2020

eternal bump

@stale stale bot removed the Resolution: Stale Automatically closed due to inactivity label Jul 13, 2020
@stale
Copy link

stale bot commented Oct 12, 2020

This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.

@stale stale bot added the Resolution: Stale Automatically closed due to inactivity label Oct 12, 2020
@ljharb
Copy link
Contributor

ljharb commented Oct 12, 2020

bump

@stale stale bot removed the Resolution: Stale Automatically closed due to inactivity label Oct 12, 2020
@EliteMasterEric
Copy link

This pull request is useful, non-breaking, and frustratingly ignored. I would appreciate it being merged, as it would make getDerivedStateFromError much more useful.

@bisubus Could you make a commit to fast forward this PR to the latest master and resolve any conflicts?

@stale
Copy link

stale bot commented Jan 9, 2022

This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.

@stale stale bot added the Resolution: Stale Automatically closed due to inactivity label Jan 9, 2022
@ljharb
Copy link
Contributor

ljharb commented Jan 9, 2022

bump

@stale stale bot removed the Resolution: Stale Automatically closed due to inactivity label Jan 9, 2022
@bvaughn bvaughn self-assigned this Jan 9, 2022
@bvaughn bvaughn removed their request for review January 9, 2022 19:08
@bvaughn bvaughn removed their assignment Jan 9, 2022
@sebmarkbage sebmarkbage deleted the branch facebook:master October 20, 2022 20:41
@ljharb
Copy link
Contributor

ljharb commented Oct 20, 2022

What happened here?

@sebmarkbage
Copy link
Collaborator

All PRs that were merging into master closed

@ljharb
Copy link
Contributor

ljharb commented Oct 20, 2022

Right, but why would you delete master instead of using github's branch renaming feature??

@sebmarkbage
Copy link
Collaborator

It was already moved, someone pushed it accidentally to recreate it and then deleting it apparently caused this.

@ljharb
Copy link
Contributor

ljharb commented Oct 20, 2022

oof, that sucks :-/ can the PR be reopened at all, or does the author have to file a new one?

@sebmarkbage
Copy link
Collaborator

Yea, I can't reopen it nor change the branch it's pointing to. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Receive previous state in getDerivedStateFromError
8 participants