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

Implement inheritence/deep merging for scenes #4

Open
Gryhyphen opened this issue Feb 15, 2020 · 0 comments
Open

Implement inheritence/deep merging for scenes #4

Gryhyphen opened this issue Feb 15, 2020 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@Gryhyphen
Copy link
Owner

Scenes should have an attribute like childrenStyle={} that enables you to define some properties/style that children should inherit (unless they override it).

This needs to keep in mind that it should occur when creating the children, not when the children are virtual.

I've heard that lodash has a nice solution to this.

If you don't deeply merge you can run into an issue like:

A = { B: {C: 1, D: 2}, APPLES: "Cool" };
shallowMerge(A, { B: { C: 2, E: 3 }) = { B: {C: 2, E:3}, APPLES: "Cool"}

See the problem is B get's overwritten, so we lose the information of D.

@Gryhyphen Gryhyphen added the enhancement New feature or request label Feb 15, 2020
@Gryhyphen Gryhyphen added this to the v0.1.0.alpha milestone Feb 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant