Closed murtyjones closed 5 years ago
Yup exactly right!
In almost all cases - unless there is some large ergonomics benefit - browser specific things should happen in the web-client and then be passed into or msg
'd into the app
.
This makes it easier to have an ios-client
or electron-client
in the future.
Closing since you were spot on - let me know if there are any other questions here!
The real answer is to just continue to update the example code and its comments over time so that all of these questions are answered for people ..
Am I right in thinking that document event listeners (e.g. listening for clicks on the
body
element) can be added only in theclient
crate of the isomorphic example? Reason being there will be runtime errors server-side when trying to add an event listener in theapp
crate