Crate idea: create a CLI arg parser for browser applications. Read an object from `window.initialState`, and serialize it into a struct. Bonus for Paw compat. We have something similar in Choo for shipping data from server to browser, and it works well! https://github.com/choojs/choo/blob/master/index.js#L53-L60 …
-
Show this thread
-
Alternative version: create a parser that reads the querystring from the url and certain allowed cookies and uses *that* as input. There is definitely dynamic data available at boot time for browser apps, and having a structured way to parse it seems useful. Needs experimenting
1 reply 0 retweets 0 likesShow this thread -
Quick sketch of what I'm talking about. I think this could really help with initial state setup of applications.pic.twitter.com/Hf0E559TMb
1 reply 0 retweets 2 likesShow this thread
(realized this example is wrong and you need to get the localization data from the navigator -- I think. But hope the general idea still translates)
8:17 AM - 7 Aug 2019
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.