Again, with the article examples, I wanted to show the idea of manipulating streams on a level, native to the framework. And I agree that they might not reflect best practices 🙂
Hope, my clumsy examples won't hide an interesting concept behind them ⭐️
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi, Tiago! Thank you for the comment 🙂
Well, since JSX is a structure of objects, React allows you to do pretty much any wild stuff in their templates too! 🤯
The given example was rather supposed to show that any child could be a stream, which gives us so many powers! (partially described above)
Would it look cleaner if we moved the request logic to a function? E.g.:
And the engine is flexible, so we can
map
the whole request result to a JSX(this one looks more reactish, imho)
Again, with the article examples, I wanted to show the idea of manipulating streams on a level, native to the framework. And I agree that they might not reflect best practices 🙂
Hope, my clumsy examples won't hide an interesting concept behind them ⭐️