TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Build Your Own React

1478 pointsby pomberover 5 years ago

27 comments

leetroutover 5 years ago
Very, very nice.<p>His presentation library is available as well!<p><a href="https:&#x2F;&#x2F;codesurfer.pomb.us&#x2F;" rel="nofollow">https:&#x2F;&#x2F;codesurfer.pomb.us&#x2F;</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;pomber&#x2F;code-surfer&#x2F;blob&#x2F;code-surfer-v2&#x2F;readme.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pomber&#x2F;code-surfer&#x2F;blob&#x2F;code-surfer-v2&#x2F;re...</a>
评论 #21538197 未加载
评论 #21541908 未加载
评论 #21540880 未加载
评论 #21538345 未加载
评论 #21539964 未加载
评论 #21545463 未加载
jjcmover 5 years ago
Presentation is amazing here.<p>That said, I recently wrote a webcomponent based router and I was surprised at how easy it was to get to a very usable point at such a minimal amount of code. All too often I get in the loop of just `npm i`&#x27;ing whatever it is I need, even if the functionality I really need is just a tiny subset of whatever huge library I&#x27;m importing.<p>Rodrigo&#x27;s right that something like this helps you understand React and how to contribute to the codebase, but I think it goes further than that - it lets you understand that the library isn&#x27;t magic. It gives you the confidence you need to think that maybe you don&#x27;t need that full 560kb library.
评论 #21538091 未加载
评论 #21537945 未加载
评论 #21542166 未加载
评论 #21538024 未加载
评论 #21539023 未加载
jaequeryover 5 years ago
Forget building my own React, I want to build how you did the presentation! It’s a great concept!
评论 #21539805 未加载
评论 #21540727 未加载
levelover 5 years ago
Along a similar vein, Sophie Alpert did a talk[1] at React Conf this year on building your own React custom renderer by using implementing the interfaces that React exposes. Sophie explains how you could use React as a declarative API for pretty much any platform if you wanted, similar to how react-native works.<p>[1] <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=CGpMlWVcHok" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=CGpMlWVcHok</a>
评论 #21538129 未加载
glofishover 5 years ago
I think that inverting the order, putting the text on the left and code on the right would work much better.<p>For me, it felt quite unnatural to go against the normal reading direction. I believe that because we read left-to-right, and the additional content is usually on the right, it would be easier for the eyes to search for the examples on the right rather than backward. It felt very distracting.<p>Great content though!
wartijn_over 5 years ago
I really like the UI of this blog. On mobile it&#x27;s a bit annoying to have the top half of the screen be filled by a black block of code, but on desktop it look definitely awesome.
yborisover 5 years ago
The presentation is stellar! I love the animated code changes on the side &lt;3
评论 #21537157 未加载
pier25over 5 years ago
Very nice. This guy is going places.<p>Hey Rodrigo so how performant do you think this didactic example would be compared to React? Maybe 80% there?
评论 #21538087 未加载
antoaravinthover 5 years ago
This is great. I did the same for Express.js last year. If anyone interested in it, here is the link: <a href="https:&#x2F;&#x2F;github.com&#x2F;antsmartian&#x2F;lets-build-express" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;antsmartian&#x2F;lets-build-express</a>
aaron-santosover 5 years ago
What a great tutorial!<p>I wanted a React-like TUI lib for a Clojure project and ended up writing facsimile by looking at the React source. Reading the React source to try to understand how React works is very challenging. This would have made the perfect guide. Thank you.
proc0over 5 years ago
Wasn&#x27;t there a very similar article recently? Wouldn&#x27;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.
评论 #21546229 未加载
hombre_fatalover 5 years ago
I find that these kinds of tutorials are great at all stages of my experience.<p>As a beginner, it&#x27;s helpful to watch someone&#x27;s thought process as they build something from scratch. I remember not even knowing where to start.<p>As a more experienced developer, I tend to know how things work independently, but am always interested to see how you might go about stitching them together at a high level.<p>Here, I liked the concurrent-mode and fiber patterns broken down into their simplest implementation to get the point across.
daliwaliover 5 years ago
I think concurrent mode and fibers are kludgy hacks that arise from the problem that only the main thread has access to the DOM. As far as I know and I may be ignorant but few, if any, other frameworks are scheduling DOM updates as aggressively as React is, and are simpler to understand as a result.<p>Hopefully the standards folks can come up with a decent DOM API for WebAssembly.
foobar_over 5 years ago
This is a great way to understand code. Why write comments, when you can make presentations? Are there similar tools like this?
jmkniover 5 years ago
Reminds me of the book &quot;Build Your Own AngularJS&quot; from a couple of years ago. - <a href="https:&#x2F;&#x2F;teropa.info&#x2F;build-your-own-angular&#x2F;" rel="nofollow">https:&#x2F;&#x2F;teropa.info&#x2F;build-your-own-angular&#x2F;</a><p>Old now, but still worth reading IMHO as you learn a lot.
Zaheerover 5 years ago
Is this the same concepts behind Vue as well? As someone that hasn&#x27;t yet dabbled in the &#x27;new&#x27; frameworks I love how this bridges the gap of understanding. Thank You!
cjover 5 years ago
This is great.<p>Implementing core libraries&#x2F;frameworks you use day-to-day, from scratch &#x2F; for fun, is one of the best and most practical ways to level up as a dev.
tomcooksover 5 years ago
WOAH amazing presentation, this is how code should be explained.<p>Quick validation: would you pay for good bits of code explained well by the author?
评论 #21538893 未加载
评论 #21538770 未加载
karolover 5 years ago
What&#x27;s interesting is the React team had to implement their own DOM manipulation abstraction, with efficient change management and not interrupting the main JS thread. Their implementation strikes me as a possible general purpose implementation that could eventually replace the way DOM works.
reggiebandover 5 years ago
Excellent 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&#x27;d probably prefer inline. It would be nice to make this an option of the presentation format.
评论 #21538123 未加载
5cottoover 5 years ago
I’ve been building apps with something similar but using D3.js (d3-select specifically) for data binding.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;ScottORLY&#x2F;miri" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ScottORLY&#x2F;miri</a>
jeltsin1234over 5 years ago
Nice tutorial, but kind of unusable on a mobile device.
musicaleover 5 years ago
I really hate the layout and the annoying, distracting, animated garbage on the left side of the page.<p>Maybe it isn&#x27;t rendering properly in my browser, but I would greatly prefer a simple, wide, vertical layout.
评论 #21541858 未加载
notgrmiover 5 years ago
estás loco boludo amazing job
wintorezover 5 years ago
Very nice!
franky47over 5 years ago
your* ?
评论 #21537159 未加载
评论 #21537128 未加载
ossworkerrightsover 5 years ago
Oh boy there comes a yet another batch of react like “frameworks” no one needs.