Distributed Reactjs routing as in Angularjs

  • I have one html and one js file for every view.
  • In angular you can have a central routing file or have it broken up and distributed.
  • For example, If http://example.com*profile is supposed to spin up the profile.html and profile.js, I will have the routing information inside the profile.js file.
  • I would like to do the same thing in React

    Is there a way, for example to have

    in the profile.js file and also have

    Can the two co-exist?

  • I am strong believer in separation of concerns for features and it would be nice if the programmer working on the “profile” view would not have to access the same routing file as the programmer working on the “widget” view.

In angular, I keep my code strictly compartmentalized. I have one html and one js file for every view. In angular you can have a central routing file or have it broken up and distributed.

@ReactAtSO: Distributed Reactjs routing as in Angularjs

I am switching from Angular.js to React.js.

In angular, I keep my code strictly compartmentalized. I have one html and one js file for every view. In angular you can have a central routing file or have it broken up and distributed.

For example, If http://example.com*profile is supposed to spin up the profile.html and profile.js, I will have the routing information inside the profile.js file.

I would like to do the same thing in React

Is there a way, for example to have

in the profile.js file and also have

in the widget.js file?

Can the two co-exist? I am strong believer in separation of concerns for features and it would be nice if the programmer working on the “profile” view would not have to access the same routing file as the programmer working on the “widget” view.

Distributed Reactjs routing as in Angularjs

You might also like More from author

Comments are closed, but trackbacks and pingbacks are open.