Written by
Aaron Bell
on
on
bidi means "bidirectional" (routing)
Dave in Lobster Writer uses bidi to: 1) Decide what should be done for a given uri?, and 2) Given a thing that should be done, what should the uri be? Bidi’s name means “bidi-rectional”, which means the string uri can give a handler, and a handler can give a string. Both cases use the pushy library. When the uri matches a handler in the route, pushy runs a given function that generally loads a matching page. When an event decides to change pages, the event gives a keyword to bidi, which gives a string, which pushy uses to update the browser’s uri.