
Show HN: My own tiny React-like rendering engine - guiCoder
https://github.com/guisouza/tembo
======
iLoch
This is cool Guilherme, however my strongest reaction to these rewrites is
always: why?

I think as a portfolio piece there's something to be said about the value of
showing that you can write your own rendering engine. But at the same time, if
I was looking at this I'd just ask, "why is he building this when React
exists?" If the only purpose is to mimic React's behaviour then I think this
is not a great use of time.

This isn't to say what you've made here isn't very cool, and I think
personally you should be proud of your work on this. But with that said, if
you love React, why not help work on the core? I'm sure there are issues with
React that need solving and if you've got the time your effort may be better
spent on there.

Aside from that, when people keep seeing rewrites like this I think it instows
a feeling of ambiguity around the capability of React "is everyone rewriting
React because it can't get the job done well enough on its down?" the casual
observe might think to themselves.

I think the same thing when I see new languages pop up. Why? These new
languages look cool and people start using them. 5 years down the line they
discover it has its own set of core problems like every other language, rinse
and repeat.

I think as a community we need to work harder on being less distracted by the
enjoyment of building _something_ and try to focus more on improving and
understanding existing technology. We can continue to push the envelope in the
name of technological advancement but often times it's difficult to discern
advancement from replacement.

Again, I think it's really cool that you've built this and I don't want to
dissuade you from building cool things. I'm just a little tired of seeing
React reimplemented over and over again with no real net gain that couldn't be
implemented in React itself.

~~~
Yaggo
> But with that said, if you love React, why not help work on the core? I'm
> sure there are issues with React that need solving and if you've got the
> time your effort may be better spent on there.

It's not that simple. One of the biggest critic towards the official React
implementation is its big size, which is a direct consequence of the decision
by the core team to include many "enterprise" features (IE support, safety
checks, etc) to suit their needs. Some people like to make different
compromise, e.g. more minimal one. You cannot easily change "political"
decisions by contributing, also not all features are easy to modularize (esp.
for outsiders).

Sometimes it's easier to implement similar API from scratch to test your own
ideas than forking an existing (mammoth) project.

Btw, another "tiny react" implementation:
[https://github.com/developit/preact](https://github.com/developit/preact)

~~~
iLoch
Valid points, however I think most people would agree these things are
important when you have multiple people working on a project. That's my
opinion, anyway.

------
s986s
I want to contribute to this but there are a few things holding me back.

\- usage of global instead of commonjs or es6 modues - using an uncommon build
system makes me uncomfortable

\- _.can instead of prototype or just object creation - I cant say I
understand why.

What I want to do

\- allow it to use multiple renderers - toString, DOM, blessed with the goal
of image output and webworker proof of concept

\- give promise support to get Initial State - when attempting isomorphism in
react, creating components based off a database is a pain unless retreived
before hand and passed from parent to child in often disgustingly deep
manners. Simply allowing the return of a promise fixes this in many ways

------
johnhenry
I'm trying to understand the differences between this and React. It seems as
though the emphasis is on the 4kb size, but I wonder if there are any other
differentiating features?

~~~
guiCoder
The main difference here is that a 300 SLOCs code-base is easier for others to
understand how it works, the react codebase has a lot of tricks and fallbacks
and etcetera. This project is for studying purposes. The best way to
understand something deeply is try to reproduces its behaviour.

------
eecks
Can you do a video tutorial as a companion to this?

~~~
guiCoder
A video tutorial showing tEmbO in action ? or a video showing the process of
building a clone ?

~~~
joaoneto
Great job!

