3 ms·
https://github.com/wisercoder/eureka/blob/master/webapp/ClientApp/controllers/AdminController.ts#L42 https://github.com/wisercoder/eureka/blob/master/webapp/Cli
by javcasas 4y ago
https://github.com/wisercoder/eureka/blob/master/webapp/ClientApp/controllers/AdminController.ts#L42 https://github.com/wisercoder/eureka/blob/master/webapp/Clie...
I love how you do React. I mean, what's more react-y than blanking the page then appending HTML? I'm gonna call that Rejqueryact, because it's jQuery inside React.
- creamyhorror 4y agoI'm not seeing React being used, though, just TSX/JSX? All the view and state updating is being done manually, but it looks fairly well-organised. There are small optimisations like debouncing onInput with a timeout (avoiding rapid re-rendering/reacting to every character typed): https://github.com/wisercoder/eureka/blob/master/webapp/ClientApp/views/FilterControl.tsx https://github.com/wisercoder/eureka/blob/master/webapp/Clie... Is this really much more complicated to implement than the equivalent implementation in React? (It's probably a bit more responsive, at least.)
- ojkelly 4y agoI think they’re referring to how Reacts mental model is to wipe the page and rerender. The earliest versions basically did that, and then they started diffing and applying the diff.
- creamyhorror 4y agoThey're referring to a specific bit of code in that Eureka repo that sets innerHtml = "" and then does .appendChild(). They just apparently didn't notice that the code doesn't use React at all (and is meant to demonstrate the use of vanilla modern JS without React).
- ojkelly 4y agoYep that’s what I was alluding to as well. I’m pretty sure they noticed it wasn’t using react. The comment was a reference to the fact that if you don’t use a framework, you’ll end up a building one anyway.
- petilon 4y agoThere is no jQuery or React being used. You can use TSX without using React. See https://github.com/wisercoder/uibuilder https://github.com/wisercoder/uibuilder