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

[legacy-framework] Added useMemo call for response from useRouter #1352

Merged
merged 1 commit into from
Oct 18, 2020

Conversation

sirmyron
Copy link
Collaborator

Closes: blitz-js/legacy-framework#963

What are the changes and their implications?

The useRouter hook now uses useMemo for the object returned, thus avoiding a new object on each render

Checklist

  • Tests added for changes
  • PR submitted to blitzjs.com for any user facing changes

@flybayer
Copy link
Member

Thanks!

@all-contributors add @sirmyron for code

@allcontributors
Copy link

@flybayer

I've put up a pull request to add @sirmyron! 🎉

@flybayer flybayer merged commit ddab8d0 into blitz-js:canary Oct 18, 2020
@sirmyron sirmyron deleted the issue1343_useRouter_not_memoized branch October 19, 2020 02:59
ntgussoni added a commit to ntgussoni/blitz that referenced this pull request Feb 7, 2021
* 'canary' of https://github.com/blitz-js/blitz: (43 commits)
  v0.25.0-canary.0
  docs: add nemesv as a contributor (blitz-js#1373)
  Fix `blitz db seed` not working (blitz-js#1363)
  docs: add sirmyron as a contributor (blitz-js#1361)
  Added useMemo call for response from useRouter (blitz-js#1352)
  Fix your jest tests failing because of useQuery error message (blitz-js#1357)
  docs: add markhaehnel as a contributor (blitz-js#1360)
  Fix blitz CLI not using proper exit codes (blitz-js#1316)
  docs: add dulcehc as a contributor (blitz-js#1359)
  (newapp) Add incremental:true to tsconfig.json (blitz-js#1350)
  Add @zanedb as a contributor
  docs: add nksaraf as a contributor (blitz-js#1358)
  Fix db.connect error when using without prisma (blitz-js#1342)
  Adds test to assert useMutation validation (blitz-js#1351)
  (newapp) Fix tests not found if app has blitz in the name (blitz-js#1355)
  Add setQueryData to react-query-utils AND rename mutate to setQueryData (blitz-js#1291)
  Fix error stack trace regression by upgrading tslog: 2.9.0 → 2.9.1 (patch) (blitz-js#1348)
  Upgrade superjson: 1.2.3 → 1.3.0  (blitz-js#1347)
  v0.24.3
  Add loading progress indicator to `blitz console` (blitz-js#1336)
  ...
@itsdillon itsdillon changed the title Added useMemo call for response from useRouter [legacy-framework] Added useMemo call for response from useRouter Jul 7, 2022
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.

useRouter returns a new object with each call
2 participants