Giter Site home page Giter Site logo

Comments (11)

yukulelix avatar yukulelix commented on May 21, 2024 20

Hey there, any update on this ? Cheers ;)

from react-laravel.

talyssonoc avatar talyssonoc commented on May 21, 2024

Huum, for now I would use the first option, the second seems wrong.

But, as I said, it's for now, I'm planning to create a @react_router directive soon !

from react-laravel.

brenelz avatar brenelz commented on May 21, 2024

That sounds pretty cool... why would you write your react routes in blade though?

from react-laravel.

talyssonoc avatar talyssonoc commented on May 21, 2024

Actually I wouldn't, the directive would mount and run the router, as the @react_component do for components, I'm still thinking about it, suggestions are welcome.

from react-laravel.

brenelz avatar brenelz commented on May 21, 2024

I do think connecting the routing somehow would be pretty awesome. Just thinking myself how I would like that to work.

from react-laravel.

talyssonoc avatar talyssonoc commented on May 21, 2024

Hey, @brenelz, sorry by the delay, I've been busy ! I'm thinking about building something using laroute, what do you think ?

from react-laravel.

a-moses avatar a-moses commented on May 21, 2024

@brenelz good direction we need something like isomorphic app .

send to client all route needed for the page if javascript fallback or client going to other page route it from the server.

from react-laravel.

karlonauger avatar karlonauger commented on May 21, 2024

@talyssonoc I like the laroute idea.
For me, the real appeal of a client-side app is the quick response of the UI, as the app only gets page specific (often Json) data from the server, following navigation.
Would this allow us to access important Laravel features like route specific middleware, and route bindings?

from react-laravel.

talyssonoc avatar talyssonoc commented on May 21, 2024

Hi, @karlonauger, as it would just generate the URL for the route I would say yes, it would allow access to middlewares and so on. I think it would let React just make ajax requests to the given URL and, there, you can say what will be sent to the client (something like this pjax example: https://github.com/defunkt/jquery-pjax#server-side), what do you think ?

from react-laravel.

karlonauger avatar karlonauger commented on May 21, 2024

That sounds great! It would save me a ton of time trying to re-design, and duplicate client-side authentication.

from react-laravel.

henfreire avatar henfreire commented on May 21, 2024

Do you know how to access direct a permanent link create by react creating the route in laravel?

from react-laravel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.