Need help structuring React app [closed] Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of Need help structuring React app [closed] without wasting too much if your time.

The question is published on by Tutorial Guruji team.

I am designing/creating an application in React, but I need some help structuring the whole thing.

The app I want to create is built as follows: enter image description here

Now, I have a couple questions about how to structure this, and what react plugins or frameworks come in handy:

  1. Should the “filter” bar be part of the main layout (“master page”)?
  2. I assume react-router is a good choice for routing in react?
  3. When working with data (both displaying and manipulating), is Flux a good thing to work with? Or has Flux nothing to do with data?
  4. I’d retrieve my data from an ASP.Net WebAPI. Is this something I’d typically do with “plain” XmlHttpRequest / jquery ajax? Or is there a more “React”-way?

  5. Extra: is there a specific reason to use Redux? I really don’t understand the use of that 🙂

Thank you in advance for your help.


I guess you can have a layout like this:

    <Navbar /> { /* Here you show the username also, this view will depend on props */ }
    <Layout /> { /* Here you may have the content and the sidenav */ }

App is the top component, the main container that passes props for example in the render() you will have

// You should treat this as a Page component, the one that grabs
// data and passes it as props to another components
export default class AppPage extends React.Component {
    render() {
        return (<AppLayout { ...this.props } />);

export default class AppLayout extends React.Component {
    render() {
        return (
            <Navbar someProp={ this.props.someProp } />
            { this.props.children }

Router can be for example:

<Router history={ browserHistory }>
  <Route path="/" component={ App }>
    <IndexRoute component={ Landing } />
    <Route path="/index" component={ Layout } />

The IndexRoute is ‘/’ and you can say which components should be used on which route, for example if you route to /layout { this.props. children } on AppLayout will render as the <Layout /> component.

I suggest you read this article: to better understand how react works… Hope it helped

We are here to answer your question about Need help structuring React app [closed] - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji