Settings

Theme

Ask HN: Rewriting parts of website in react, thoughts and best practices?

1 points by ciaran-ifelse 5 years ago · 3 comments · 1 min read


We have a fairly complex dashboard written with PHP, HTML and JQuery but we are considering rewriting parts that are slow/needs updated with react.

I was wondering if anyone has past experience and what is the best way to go about this?

Is react the best way to go?

cell9840179419 5 years ago

React can be a way forward. But it won't automatically improve the perf. First take a look at your middware if you have decision making power on that. The slowness can be mitigated using microservices and graphQL. Without this enhancement, widget to widget, PHP/jQuery is hard to beat.

There are many ways to write react. Take a solid boilerplate like react-boilerplate. Then bolt a good dashboard template on it. Get rid of crazy stuff (redux etc) Use Material. Write simple Functional components using hooks and tie everything together.

When you are rewriting, let go some stuff that you don't need.

Source: we are in the middle of what you want to do.

  • ciaran-ifelseOP 5 years ago

    Are you rewriting same functionality but in a brand new project or are you adding react components to an old project?

    • cell9840179419 5 years ago

      Adding a new subsystem (30%) and bringing 90% of old in to react. Just plain convert did not justify the investment as our existing system is already written for perf. The only issue is the UI feels dated. It is Tomcat based.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection