goose-parser icon indicating copy to clipboard operation
goose-parser copied to clipboard

Remove useActionsResult

Open jifeon opened this issue 8 years ago • 2 comments

We have stores now and can set data in one action and get it inside another, useActionsResult is used to get actions result from previous actions, it's rudiment and should be removed

jifeon avatar Jun 05 '16 11:06 jifeon

@jifeon could you clarify that issue a bit more?

maZahaca avatar Dec 23 '16 13:12 maZahaca

Now it looks like:

{
  actions: [],
  name: 'blah',
  useActionsResult: true
}

so in last action you return a promise which resolves with value, which will saved as blah. It imposes limitations:

  • You should have actions beside the property which you wanna parse to
  • Last action should return desired result

In the same time we have stores and can use action { type: 'any_type', set: 'key_name_in_storage' } at any place in parsing process and use saved value in a rule { get: 'key_name_in_storage' }

That's why I think useActionsResult is redundant and must be removed

jifeon avatar Jan 02 '17 10:01 jifeon