extracting active CTA state from header component into global #878
ParkerGits
started this conversation in
Pitches
Replies: 1 comment
-
https://github.com/skillrecordings/products/blob/main/packages/player/src/context/video-context.tsx some of the state machine as context work here in the player makes sense to me to use here I have not added persisting state to this yet, but it's something xState supports so you can load the state of a machine from local storage (or API) the "sorting hat" is poorly named because it's a generic data-driven survey mechanism that can be used for asking any sequence of questions in a branching fashion. You can configure a survey to ask any number of questions before reaching a "final" state that is some CTA or message. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Building off of #826 and #824, this pitch aims to outline approaches for extracting CTA state to the global level.
From recent related discussions, I can discern two high-level goals for CTA's on egghead:
Regarding personalized CTAs
The data sources that I can clearly see being utilized for the personalization of CTAs are
My mention of the sorting hat survey is related to @MaggieAppleton's comment in #824.
If the existing sorting hat survey questions are insufficient for determining what CTA to present, we could either iterate on the existing survey questions or offer a new survey related solely to personalizing CTAs.
Concerning the data in customer-io and convertkit: I have little knowledge about how that data is stored; I'm likely due for a tour of these tools before I get going here.
Regarding global access to CTA state
I'm envisioning either
At the moment, the Active CTA state is local to the Header component and controlled within a switch statement. As a short-term solution, this logic can easily be extracted into an "Active CTA" state machine where the state can then be provided globally.
(link to machine gist)
However, I have little insight into whether this option is preferable to the reducer in the long run. Again, I should become more familiar with the data provided by customer-io and convertkit before I take this any further.
Recap & Looking Forward
Beta Was this translation helpful? Give feedback.
All reactions