Skip to content

Component static method pattern missing. #21

@reinisriekstins

Description

@reinisriekstins

Hello.

I believe that reactpatterns.com is missing a design pattern I recently stumbled across here: http://webrafter.com/opensource/react-foundation-apps/tabs
It adds static methods to a React component factory/class, that are also React factories or classes, making the JSX code look like this (notice the dot in Tabs.Tab):
<Tabs> <Tabs.Tab title='Tab 1'> Tab 1 content </Tabs.Tab> <Tabs.Tab title='Tab 2'> Tab 2 content </Tabs.Tab> <Tabs.Tab title='Tab 3'> Tab 3 content </Tabs.Tab> </Tabs>

While not strictly a React design pattern, since this can be done with any function, I hadn't thought that you could do something like that with a React component and think that it belongs on your excellent website.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions