LiveEx.Example.init

You're seeing just the function init, go back to LiveEx.Example module for more information.

Specs

init(socket()) :: socket()

Call this function from the mount/2 function of your "root"-LiveView.

Adds the initial state variables to the socket.assigns and returns the updated LiveView.Socket.

Specs

init(map(), socket()) :: socket()

Configures the socket with an initial setup.

The pid of the parent process is stored in the socket.assigns so that Child processes can dispatch Actions on the parents's Store.