Earlier quoted context omitted.
> webcomponent based router Routers can be (and should be, IMO) written to be independent of UI component libraries such as React and webcomponents. See an example here: https://github.com/Rajeev-K/mvc-router You can use it with React---and in some ways it works better than react-router.
Yeah I'm not a fan at all of react-router because it's too dependent on React. For redirecting, for example, they recommend you render a component. Which is just bananas to me.
Build Your Own React
101–110 of 114 posts
Re: Build Your Own React
#102Wasn't there a very similar article recently? Wouldn't mind if this is a new tutorial trend. Regardless the presentation of this article is great! I hope this also catches on, it has maximum scanning efficiency.
Re: Build Your Own React
#103WOAH amazing presentation, this is how code should be explained. Quick validation: would you pay for good bits of code explained well by the author?
I have once already: https://www.amazon.com/Beautiful-Code-Leading-Programmers-Pr... I liked it, but I'm not going to be paying for this sort of thing often. I think a lot would hinge on having content that was high quality, and being able to persuade me that it would be high quality before I paid for it might be challenging.
Re: Build Your Own React
#104Excellent content. I did find that the code previews in the side bar occasionally changed before or after I expected. I understand the intent with having them adjacent rather than inline ... but I'd probably prefer inline. It would be nice to make this an option of the presentation format.
Is it because you read closer to the top or bottom of the viewport? I want to add a print mode that would have each code step inline.
Of the two, I probably favour aligning to the top. But since I alternate I would probably have changed to inline.
Re: Build Your Own React
#105Very, very nice. His presentation library is available as well! https://codesurfer.pomb.us/ https://github.com/pomber/code-surfer/blob/code-surfer-v2/re...
Please don't perpetuate this type of animated presentation style. Why? 1) Vertical layout is easier to scroll 2) Vertical layout puts the code blocks in-line to know where they belong in the text 3) Author's presentation style has animations that slow down user's ability to scan quickly 4) Scroll position determines the code block's visibility (!!! WTF) 5) Either have the entire page white or black. The contrast chan…
Re: Build Your Own React
#106Earlier quoted context omitted.
I agree, though, it's a shame there's no fallback for when there's no javascript.
I'll assume this was meant with irony, and applaud you for this comment.
Re: Build Your Own React
#107Earlier quoted context omitted.
could you recommend any articles/tutorials that describe this approach some more?
This Ryan Florence talk is a great talk that touches on this topic, especially in some of the more creative examples: https://www.youtube.com/watch?v=kp-NOggyz54
Re: Build Your Own React
#108Earlier quoted context omitted.
HTML custom elements (basis for web components) are intended for things that should be added to DOM. Using it for any other purpose is probably a misuse.
In my personal case I'm using it so the DOM is more literal as to what's happening on the page. I'm of the naive opinion that you should be able to read the DOM and have a general sense of what the site looks like. Since I'm making a single-page site that loads everything at once, I have a webcomponent based router that declaratively states what route will be active given the URL. For example: 𝚖𝚢-𝚛𝚘𝚞𝚝𝚎𝚛 𝚖𝚢-…
edit: unidecoded:
my-router
my-route(pattern="/home")
// some home page
my-route(pattern="/news")
// some news pageRe: Build Your Own React
#109Earlier quoted context omitted.
You felt so passionately that you needed to say the same thing three times? This isn’t documentation, think of it more like a slide deck or tutorial. If it’s not your cup of tea, read the source material on Github or look elsewhere for the knowledge. While I somewhat agree with you on it’s a bit overkill, harping on that point repetitively is pointless.
Documentation, presentation, etc. - fundamentally, it is presenting sequential information to the user. And yes, I will say it again, this is NOT the way to do presentations. This is the programming presentation equivalent of designer things like this: https://www.ibm.com/plex/ Absolutely dreadful. But, thanks for the insight and advice about harping on something that I feel passionate about.
Given they are helping you out by pointing out a situation where you're being a bit obtuse and socially awkward (and thus helping you avoid similar situations in the future), I'd think that's pretty good. =)
Re: Build Your Own React
#110Earlier quoted context omitted.
This might even become standard for most documentations.
I couldn't disagree more. This is not what a documentation should be like. Unnecessary animations, fixed scrolling, and just useless "snazzy" aspects of user interface has no place in code documentation. I hope this does not become the standard.