reactjs - Using redux in complex SPA app -


i'am ambiguous how implement redux in complex app using atomic design.

as remember, atomic design methodology composed of 5 distinct stages working create interface design. 5 stages :

  • atoms button, text input,
  • molecules search field composed of 1 input , 1 button,
  • organisms search form,
  • templates generic template,
  • page search page using generic template, search organisms, molecules or atoms search form, item list, header , footer.

imagine app composed :

app (page)     header (organism in template)         menu (molecule)             button (atom)             ...             button (atom)         link (atom)     content (div)         form (organism in page)             field (molecule)                 label (atom)                 input (atom)             field (molecule)                 label (atom)                 input (atom)             button (atom)     footer (organism in template)         link (atom) 

on stage, implement redux ?

  • a reducer/container in each organism, action button ?
  • a reducer/container in template (for common components), action button ?
  • another strategy ?

we have similar case @ work:

  • template & layout component (organic)
  • specific pages (page)
  • business component (organisms : specific business component specific page)
  • technical components (molecules & atoms)

redux main use case able share common data through multiple components & pages. in many cases, application data shared: connected user data, identifiers, list of comments, list of bank account, whatever... result, page , functional component must filled redux state data. means receive data redux state , passes these data props sub-component.

using "atomic design", means page , organisms connected redux state.

in our case @ work:

  • "specific pages" , "business component" connected redux.
  • "technical components" use own react state. better have technical component handling own state because ease integration in external projects. having component uses redux means project needs add requires reducers use component.
  • "template & layout component" doesn't use state , depends on props.

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -