3 ms·
Build your own React (2019)
- sxp 2y agoFor those wondering how the site was made, the author has a bunch of videos explaining his frameworks for coding tutorials: https://www.youtube.com/c/RodrigoPombo https://www.youtube.com/c/RodrigoPombo His Scrollycoding framework uses a DSL similar to markdown+xml for the script and generates the webpage from it.
- pomber 2y agoAuthor here. I'm working on a new version of Code Hike, more flexible. Docs: https://v1.codehike.org/docs https://v1.codehike.org/docs
- sxp 2y agoAre your older build-a-react tutorial available anywhere? The links on your site are broken and I wanted to implement a class/object based system using your older tutorial.
- pomber 2y agoyes, try to find them on medium.com directly. I'm afk travelling right now, I'll update the links next week
- sxp 2y agoThanks for the pointer. For others who are interested: https://medium.com/hexacta-engineering/didact-learning-how-react-works-by-building-it-from-scratch-51007984e5c5 https://medium.com/hexacta-engineering/didact-learning-how-r... and https://medium.com/@pomber https://medium.com/@pomber are the articles.
- drivingmenuts 2y agoInteresting - the one thing that makes me leery of React is that design is not separated from code. I'm used to HTML and CSS being in the province of the designer and I absolutely hate that there is no separation of concerns. The one thing I would remove from React is the ability to specify styling other than class and/or id for all but a few elements. Now, it looks like I can do just that, maybe?
- zarzavat 2y agoHTML itself allows inline styles. I’m not sure how or why you would want to remove it from React, since it’s part of DOM. If you don’t want to use inline styles, then don’t use them. Though even if you use a stylesheet, they are still essential for setting CSS variables.
- lgas 2y agoI could see the argument to be made for imposing restrictions in React that don't exist in the next level down -- eg. something along the same lines as the argument for removing arbitrary effects in functional programming. However, I agree that this particular idea doesn't make much sense.
- digging 2y agoI don't think I follow your concerns. For styling, there has never been a requirement (or even, really, an incentive) to style your elements directly in JSX. It's possible to do so but you're just passing through inline styles to HTML. For "the province of the designer," do you mean the designers of your sites are writing all the HTML and CSS themselves? I do not think that's the province of the designer personally, but it may be an older school of thought (I only started my career in the age of React). When writing in JSX, they truly can become thoroughly intertwined, as the structure influences the styling and vice-versa, and code can control either of those other options. I find this complex, but quite reasonable. The majority of the time it's actually just straightforward.
- smokel 2y agoThis seems to be the pattern that Angular uses. I've written quite a few Angular applications, but I have never been in a situation where a designer creates usable HTML and CSS, and the developers provide the code. It just seems like a pipe dream, but perhaps we should change the way we are working?
- wackget 2y agoIt's funny, I've been a web developer for many, many years and I've yet to see any compelling argument for why React (or similar libraries) should even exist. Every single time I look into them I just can't find a reason why I'd ever want to use them over regular HTML and JavaScript. This is especially true in recent years when so many convenience functions have been added to the languages which you'd only previously find in the likes of jQuery etc. I've looked at framework comparison sites like ToDoMVC.com and the React code just looks so disgustingly over-engineered. I just don't get it at all.