Very, very nice. His presentation library is available as well! https://codesurfer.pomb.us/ https://github.com/pomber/code-surfer/blob/code-surfer-v2/re...
This might even become standard for most documentations.
Build Your Own React
91–100 of 114 posts
Re: Build Your Own React
#92Very, 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
#93Earlier quoted context omitted.
It's not really bananas when you actually start to think of everything 'as components', and consider that 'render' can neatly, declaratively describe behaviour, not just the DOM.
'render' should render, because that's what the function name says. If you're using it for behavior then you're not using it for the intended purpose.
You're not using React to its full potential if you think like this.
Re: Build Your Own React
#94Earlier quoted context omitted.
'render' should render, because that's what the function name says. If you're using it for behavior then you're not using it for the intended purpose.
Now that hooks exist, this should definitely be the case. Before, HoCs / components with render prop functions were actually useful for doing some additional not-directly-render related work.
Re: Build Your Own React
#95Earlier quoted context omitted.
It's not really bananas when you actually start to think of everything 'as components', and consider that 'render' can neatly, declaratively describe behaviour, not just the DOM.
could you recommend any articles/tutorials that describe this approach some more?
Re: Build Your Own React
#96Earlier quoted context omitted.
That’s precisely the problem - if both sides were moving together, in time it would be a slide deck, in space it would be a scrolling document. Here, we have the left and right side, changing in time and space, respectively, and burdening the user with cognitive dissonance.
if both sides were moving together, in time it would be a slide deck, in space it would be a scrolling document There is a fundamental difference between reference material, where only the final version is relevant, and tutorial material, where the evolution is also important. You keep making similar comments in this discussion where you compare this tutorial/exposition format to typical reference documentation, but…
Re: Build Your Own React
#97Earlier quoted context omitted.
if both sides were moving together, in time it would be a slide deck, in space it would be a scrolling document There is a fundamental difference between reference material, where only the final version is relevant, and tutorial material, where the evolution is also important. You keep making similar comments in this discussion where you compare this tutorial/exposition format to typical reference documentation, but…
Exactly. This presentation style made it much easier for me to see what was being added to the code. I don't like having to continually scan different blocks of code to see what changed, and try to make sense of how the changes fit in the bigger picture.
Indeed.
Visual diff tools were invented for a reason, and using a side-by-side layout with some sort of colour coding and some attempt to align equivalent code is now close to universal. No-one would suggest doing code reviews by printing out the last two versions of a source file and comparing them on paper any more.
In presenting tutorial material like this, IME the two most effective formats have been either something like that side-by-side diff, often with some extra annotations like chunky labelled arrows to highlight the specific areas or changes of interest, or something like the style here, with the changes at each step being highlighted and/or animated so it's easy to follow along. Both of these work for code but also other illustrations.
Re: Build Your Own React
#98Re: Build Your Own React
#99Re: Build Your Own React
#100Very, very nice. His presentation library is available as well! https://codesurfer.pomb.us/ https://github.com/pomber/code-surfer/blob/code-surfer-v2/re...