Skip to content

Fill in selectors file to make components app fully functional #1

Description

@thinkloop

The selectors file provides the dummy model for the components app to render and do stuff. It is composed of two main parts, the data, and the handlers that allow for interaction.

The data should match the selectors in the core app, visible by inspecting window.selectors.

Handlers are implemented very simply using selectors.update({ statePiece1: newValue }) function. It works by passing in some selector state that needs to be mutated, then the function re-renders the app.

For example, one of our selector keys is activePage. This holds a string specifying which main page we are on. We want to be able to update this key by clicking on various links in the site-header so we can switch pages in the ui. To do this, for the login link, we have: onClick: () => module.exports.update({ activePage: LOGIN }). That basically says, when the login link is clicked, set activePage to LOGIN then re-render the site.

This issue is about filling in all the missing props and handlers to make the components site work similarly to the live site.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions