Perspective - binding to current breakpoint value

As we previously mentioned in this thread, providing insight into Breakpoint properties is inherently dangerous as it invites (pseudo-code)

self.page.breakPointInUse = self.view.props.breakpoints[indexIWant]

when really it’s not on the View or code to determine which breakpoint is in use; that should fall entirely on the backend code.

Viewport dimensions on the other hand are absolutely something a user might like to know about. Whether we should allow for writing back to them is something else entirely, so in what way do we provide those values? They’re independent to the session, so session properties seems the logical choice, but if they’re read-only we need to lock them down, which is something we need to look into.

1 Like