# Problem creating button with drab

**URL:** <https://forum.elixirforum.com/t/problem-creating-button-with-drab/30036>\
**Category:** Questions\
**Tags:** phoenix, testing, drab\
**Created:** [March 24, 2020, 1:23am UTC](https://forum.elixirforum.com/t/problem-creating-button-with-drab/30036 "2020-03-24T01:23:50Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![egze](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/egze/32/13522_2.png) [@egze](https://forum.elixirforum.com/u/egze)\
**Post date:** [March 24, 2020, 4:29pm UTC](https://forum.elixirforum.com/t/problem-creating-button-with-drab/30036/4 "2020-03-24T16:29:43Z")

</div>

Sorry no specific examples. But do read up on [DynamicSupervisor](https://hexdocs.pm/elixir/DynamicSupervisor.html). Try to write a GenServer that can be started dynamically with some params (like user\_id for example). Play with it in the IEx and make sure you understand how to start the process and find it later by params.

Then once you got that - do the same in Drab. In the `onload` callback, locate or start your GenServer like you did in IEx. Now your GenServer will survive reload of page/Drab.

**Edit**  
I think you’d start your GenServer in the `click:test_start` callback. Or maybe a [Task](https://hexdocs.pm/elixir/Task.html) will also be fine here.

---

_[View the full topic](https://forum.elixirforum.com/t/problem-creating-button-with-drab/30036)._
