Fork me on GitHub

Probably there are JS APIs for that?


Not quite sure what you meant there


after some more research the HTML textarea object exposes the needed data and @sekao has a library called cross-parinfer and some dom functions in paren-soup that meet my needs


Anyone have opinions on view components that generate their own subs and events. We are starting to build more complicated components, like paginated table, and have a lot of similar views and events for each one. We were able to write code that bundles this all into a single view component so you don’t have to manually create all the subs and events. The problem is that all the reg-sub and reg-events fire every time the component is redrawn. That doesn’t seem like a big deal but wanted to get others feedback.


I understand this leads to the convention vs configuration debate, but would like to stay out of those waters. Really my question is: have people done any auto generation of subs and events and are there ways to prevent the re-registering


Hi. I did no such thing. What I am using though is events and subs which are registered just once - but they accept some sort of id as their argument. Data of the component is then stored under the id in app-db. So If I understand you correctly, you're generating subs like :user-grid-page-data, :company-grid-page-data... I have only 1 sub :grid-page-data which accepts id parameter (`user`, company ...). Same for events. Example can be seen here: where I have 2 different counters (one is shown twice). Both counters use single event:


hi there! I have a project were I would like to send tracking events to an analytics provider. I am currently using add-post-event-callback but it doesn't fit the bill 100% since the callback requires a handle on app-db. do you guys know of a way to do this without using globals or how are people solving this today?


@msuess what do you require the app-db for I’m wondering


@mikerod we're storing an online flag in there that indicates whether or not the app is connected to the internet. if there is no connection, the tracking events need to be stored to be submitted at a later time.


@msuess that’s interesting. I wonder if you should use a custom intercepter that you include in your interceptor chain on all of your event handlers


I'll look into that, thanks for the advice @mikerod!

👍 4