Skip to content

[Beta] useEvent -> useEffectEvent#5373

Merged
gaearon merged 2 commits into
mainfrom
useeffectevent
Dec 16, 2022
Merged

[Beta] useEvent -> useEffectEvent#5373
gaearon merged 2 commits into
mainfrom
useeffectevent

Conversation

@gaearon

@gaearon gaearon commented Dec 16, 2022

Copy link
Copy Markdown
Member

To mirror react/react#25881.

  • useEvent -> useEffectEvent
  • "Event function" -> "Effect Event"
  • Not stable functions anymore, instead they have to be omitted from deps

@github-actions

github-actions Bot commented Dec 16, 2022

Copy link
Copy Markdown

Size Changes

Details

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 89.11 KB (-1 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

@karlhorky

Copy link
Copy Markdown
Contributor

Thanks for this @gaearon !

Since @sebmarkbage mentioned that the RFC is "defunct", should one or both of the following things also happen?

  1. Remove the link to the RFC from the docs
  2. Remove or rework the RFC at https://github.com/reactjs/rfcs/blob/useevent/text/0000-useevent.md (I can create a separate issue about this over there if necessary)

@gaearon

gaearon commented Dec 23, 2022

Copy link
Copy Markdown
Member Author

We need to post a new RFC but it's effectively the same content that's in the docs. I guess removing the link would also work.

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.

3 participants