Skip to main content

If I have an React/Redux single page application that has - say - a customers page that lists businesses that are customers, and from there each customer can be accessed with a URL like this:

/customer/1/customer/1

From there, the page lists contacts at said customer, and the user can drill into individual contacts at that customer:

/contact/58/contact/58

On the contact page, there are details about the customer, and a few details about the customer they work for.

This all works fine if the user navigates through the pages as I've described. But if the user goes straight to /contact/58, there won't be any state about the customer to display.

Finally -, the question: how should Redux-based SPAs cope with this?

If I have an React/Redux single page application that has - say - a customers page that lists businesses that are customers, and from there each customer can be accessed with a URL like this:

/customer/1

From there, the page lists contacts at said customer, and the user can drill into individual contacts at that customer:

/contact/58

On the contact page, there are details about the customer, and a few details about the customer they work for.

This all works fine if the user navigates through the pages as I've described. But if the user goes straight to /contact/58, there won't be any state about the customer to display.

Finally - the question: how should Redux-based SPAs cope with this?

If I have an React/Redux single page application that has - say - a customers page that lists businesses that are customers, and from there each customer can be accessed with a URL like this:

/customer/1

From there, the page lists contacts at said customer, and the user can drill into individual contacts at that customer:

/contact/58

On the contact page, there are details about the customer, and a few details about the customer they work for.

This all works fine if the user navigates through the pages as I've described. But if the user goes straight to /contact/58, there won't be any state about the customer to display.

Finally, the question: how should Redux-based SPAs cope with this?

Fixed as per initial answer's query
Source Link

If I have an React/Redux single page application that has - say - a customers page that lists businesses that are customers, with the following URL, whichand from there each customer can be accessed with a URL like this:

/customerscustomer/1

From there, the page lists contacts at said businesscustomer, and the user can drill into individual contacts at that customer:

/contact/58

On the contact page, there are details about the customer, and a few details about the customer they work for.

This all works fine if the user navigates through the pages as I've described. But if the user goes straight to /contact/58, there won't be any state about the customer to display.

Finally - the question: how should Redux-based SPAs cope with this?

If I have an React/Redux single page application that has - say - a customers page that lists businesses that are customers, with the following URL, which can be accessed like this:

/customers/1

From there, the page lists contacts at said business, and the user can drill into individual contacts at that customer:

/contact/58

On the contact page, there are details about the customer, and a few details about the customer they work for.

This all works fine if the user navigates through the pages as I've described. But if the user goes straight to /contact/58, there won't be any state about the customer to display.

Finally - the question: how should Redux-based SPAs cope with this?

If I have an React/Redux single page application that has - say - a customers page that lists businesses that are customers, and from there each customer can be accessed with a URL like this:

/customer/1

From there, the page lists contacts at said customer, and the user can drill into individual contacts at that customer:

/contact/58

On the contact page, there are details about the customer, and a few details about the customer they work for.

This all works fine if the user navigates through the pages as I've described. But if the user goes straight to /contact/58, there won't be any state about the customer to display.

Finally - the question: how should Redux-based SPAs cope with this?

Source Link

Single Page Apps: handling state dependencies

If I have an React/Redux single page application that has - say - a customers page that lists businesses that are customers, with the following URL, which can be accessed like this:

/customers/1

From there, the page lists contacts at said business, and the user can drill into individual contacts at that customer:

/contact/58

On the contact page, there are details about the customer, and a few details about the customer they work for.

This all works fine if the user navigates through the pages as I've described. But if the user goes straight to /contact/58, there won't be any state about the customer to display.

Finally - the question: how should Redux-based SPAs cope with this?