Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all,
Vanilla are planning an update to the site on April 24th (next Wednesday). It is a major PHP8 update which is expected to boost performance across the site. The site will be down from 7pm and it is expected to take about an hour to complete. We appreciate your patience during the update.
Thanks all.

ReactJS - HOC vs Twig/Laravel template

Options
  • 19-09-2020 8:11pm
    #1
    Registered Users Posts: 250 ✭✭


    Hi

    I have a fairly large web app I am working on (built in ReactJS) using SLIM/Propel for the backend. Currently I need to implement the user onboarding workflow (registration/verification/login), which brings me to my dilemma - I am stuck in that I cannot decide what is the best way forward. I have a fair amount of work done on the back end using SLIM for the Restful API, and Propel for the ORM, so I am very reluctant to do too much rewriting/porting due to time constraints.

    I think templating for security reasons is a good way forward, so I can either use Twig, or Laravel. Naturally I'd prefer to go the Twig route (because I have built a very slim TWIG scaffold that seems to authenticate well, and also there would be very little porting required). But from what I can find there seem to be a good few resources helping with integrating Laravel and React, but not so much Twig and ReactJS.

    Alternatively, I can skip TWIG/Laravel all together and stick to a pure ReactJS app, using HOC components for pre-and-post authentication activities, but I don't know if this is a good way forward.

    Any advice would be appreciated.


Comments

  • Registered Users Posts: 385 ✭✭spaceCreated


    Would it not be handier to just use something like react-router and a normal authentication flow to protect the routes & components? I'm not sure exactly what you mean by templating though.

    (I'm trying not be pedantic but HOC stands for higher order component, so no need to say HOC components)


Advertisement