# Programming Phoenix LiveView B8: Confusing unused parameters (p. 57)

**URL:** <https://forum.devtalk.com/t/programming-phoenix-liveview-b8-confusing-unused-parameters-p-57/78992>\
**Category:** PragProg Customers\
**Tags:** book-programming-phoenix-liveview, errata\
**Created:** [19 October 2022 13:46 UTC](https://forum.devtalk.com/t/programming-phoenix-liveview-b8-confusing-unused-parameters-p-57/78992 "2022-10-19T13:46:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bzuu](https://forum.devtalk.com/letter_avatar_proxy/v4/letter/b/94ad74/32.png) [@bzuu](https://forum.devtalk.com/u/bzuu)\
**Post date:** [19 October 2022 13:46 UTC](https://forum.devtalk.com/t/programming-phoenix-liveview-b8-confusing-unused-parameters-p-57/78992/1 "2022-10-19T13:46:15Z")

</div>

In the code sample for auth `/pento/lib/pento_web/live/user_auth_live.ex` the `on_mount` function is defined as:

`on_mount(_, params, %{"user_token" => user_token} = _session, socket)`

It seems the the `params` argument is never used so could be replaced with `_params` while the assignment to `_session` seems unnecessary so we end up with:

`on_mount(_, _params, %{"user_token" => user_token}, socket)`

---

<div class="post-metadata">

**Author:** ![SophieDeBenedetto](https://forum.devtalk.com/user_avatar/forum.devtalk.com/sophiedebenedetto/32/2521_2.png) [@SophieDeBenedetto](https://forum.devtalk.com/u/SophieDeBenedetto)\
**Post date:** [26 January 2023 13:31 UTC](https://forum.devtalk.com/t/programming-phoenix-liveview-b8-confusing-unused-parameters-p-57/78992/2 "2023-01-26T13:31:52Z")

</div>

Thanks for your feedback! We are hard at work on a major revision right now and will release the new version of the book before the end of February with this addressed.

---

<div class="post-metadata">

**Author:** ![Kurisu](https://forum.devtalk.com/user_avatar/forum.devtalk.com/kurisu/32/1106_2.png) [@Kurisu](https://forum.devtalk.com/u/Kurisu)\
**Post date:** [26 February 2023 19:35 UTC](https://forum.devtalk.com/t/programming-phoenix-liveview-b8-confusing-unused-parameters-p-57/78992/3 "2023-02-26T19:35:14Z")

</div>

Hello @SophieDeBenedetto, thank you for this good news!

I have a question please, will this new version of the book include Phoenix 1.7?  
Either way, it’s a great book!

---

<div class="post-metadata">

**Author:** ![SophieDeBenedetto](https://forum.devtalk.com/user_avatar/forum.devtalk.com/sophiedebenedetto/32/2521_2.png) [@SophieDeBenedetto](https://forum.devtalk.com/u/SophieDeBenedetto)\
**Post date:** [27 February 2023 22:18 UTC](https://forum.devtalk.com/t/programming-phoenix-liveview-b8-confusing-unused-parameters-p-57/78992/4 "2023-02-27T22:18:38Z")

</div>

Indeed it will!

---

<div class="post-metadata">

**Author:** ![Kurisu](https://forum.devtalk.com/user_avatar/forum.devtalk.com/kurisu/32/1106_2.png) [@Kurisu](https://forum.devtalk.com/u/Kurisu)\
**Post date:** [28 February 2023 03:06 UTC](https://forum.devtalk.com/t/programming-phoenix-liveview-b8-confusing-unused-parameters-p-57/78992/5 "2023-02-28T03:06:48Z")

</div>

This is fantastic, I can’t wait to get it! ^^
