Conversation
Ah forgot about this 😂 , yeah so this was useful for us for like deep objects we fabricate, where say we want the segment id be that of the parent leg. It would just mean we can inline it, so rather than: const legId = uuid();
const segment = segmentFabricator({ legId }})
const leg = legFabricator({ id: legId, segment }})we could do: const leg = legFabricator(leg => ({
...leg,
segment: segmentFabricator({ legId: leg.id }})
})This is a simple case, but we have use cases where we need to make sure say text for child properties matches those further up the chain |
There was a problem hiding this comment.
1 issue found.
About Unblocked
Unblocked has been set up to automatically review your team's pull requests to identify genuine bugs and issues.
📖 Documentation — Learn more in our docs.
💬 Ask questions — Mention @unblocked to request a review or summary, or ask follow-up questions about your code.
👍 Give feedback — React to comments with 👍 or 👎 to help us improve.
⚙️ Customize — Adjust settings in your preferences.
0584e4a to
d7c7217
Compare
52b2aa6 to
b3cb147
Compare
Added a way to access current state of the fabricated object. While this same behaviour can achieved by using more fabricators and consts, this should give a little more flexibility in the way we use it