Jdlrobson added a comment. |
My React prototype has server side rendering for anonymous users (view-source:https://nomad.wmflabs.org/wiki/San%20Francisco) - logged in users just use JS, so this is not a problem and there would be no need to write HTML twice as @Jan_Dittrich points out. @TheDJ practically speaking this could be achieved by setting up a REST endpoint that returns HTML e.g. https://en.wikipedia.org/api/rest_v1/page/html/San_Francisco - only that HTML would include script/style tags (possibly to ResourceLoader urls or static urls). For JS rendering you could either use the same endpoint or a json version e.g. https://en.wikipedia.org/api/rest_v1/page/json/San_Francisco
@Magnus that is indeed awesome and demonstrates how easy this can be. Add the Wikidata shell around that and you won't know the difference about what you're using - but I imagine it can be a lot snappier. I'm looking forward to perusing the code. The benefit of using JS only is it lends itself better to service workers - so offline experiences and offline editing are real possibilities.
Really want to spend some solid time hacking on this kind of experience!
Cc: Niedzielski, Magnus, Milimetric, Prtksxna, Fjalapeno, phuedx, Jdlrobson, siddharth11, Capt_Swing, TheDJ, Jdforrester-WMF, SBisson, WMDE-leszek, Volker_E, Krinkle, gabriel-wmde, Jonas, thiemowmde, Lydia_Pintscher, Jan_Dittrich, Jhernandez, Jdrewniak, Aklapper, QZanden, SamanthaNguyen, JGirault, D3r1ck01, Izno, Wikidata-bugs, aude, Mbch331, Jay8g
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs