Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

controlled editable component #69

Open
wants to merge 12 commits into
base: feat/view-pages
Choose a base branch
from

Conversation

GamerGirlandCo
Copy link
Collaborator

This component lets you pass in a component reference as a prop, rendering that component with its own managed state + dispatch. Eliminates the need to pass dispatch everywhere.

An example of it in action:

<dc.ControlledEditable<T>
            props={editorProps}
            sourcePath={dc.currentPath()}
            content={item}
            editor={dc.TextEditor}
            onUpdate={onUpdate}
            defaultRender={<Lit value={item}/>}
        />

@GamerGirlandCo GamerGirlandCo changed the base branch from master to feat/view-pages October 22, 2024 18:19
@GamerGirlandCo GamerGirlandCo force-pushed the feat/controlled-editable branch 2 times, most recently from 682e263 to 4bcd875 Compare October 28, 2024 22:01
@GamerGirlandCo GamerGirlandCo force-pushed the feat/controlled-editable branch 6 times, most recently from 8c41278 to 4938964 Compare November 3, 2024 23:40
@GamerGirlandCo GamerGirlandCo force-pushed the feat/controlled-editable branch 5 times, most recently from ce820aa to 3ca894c Compare November 4, 2024 20:46
@GamerGirlandCo GamerGirlandCo force-pushed the feat/controlled-editable branch from 3ca894c to 9e92ca5 Compare November 6, 2024 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants