Skip to content

Conversation

rvsia
Copy link
Contributor

@rvsia rvsia commented Sep 2, 2020

This PR prepares API for rerendering form based on state changes

function = () => {
   const render = prepareRerender(); // snapshots current state

   ... do some changes ...

   render(); // as the argument additional formState keys can be inserted manually, compare the old state and new state
}

@rvsia rvsia added the State manager Form state manager packages. Will be used a state management package for the form renderer. label Sep 2, 2020
@rvsia rvsia requested a review from Hyperkid123 September 2, 2020 12:20
@codecov
Copy link

codecov bot commented Sep 2, 2020

Codecov Report

Merging #777 into state-manager will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@                Coverage Diff                @@
##           state-manager     #777      +/-   ##
=================================================
+ Coverage          93.19%   93.22%   +0.02%     
=================================================
  Files                224      225       +1     
  Lines               3823     3838      +15     
  Branches            1196     1199       +3     
=================================================
+ Hits                3563     3578      +15     
  Misses               260      260              
Impacted Files Coverage Δ
...es/form-state-manager/src/utils/find-difference.ts 100.00% <100.00%> (ø)
...ckages/form-state-manager/src/utils/manager-api.ts 95.71% <100.00%> (+0.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 67f2338...7d60f8d. Read the comment docs.

Copy link
Member

@Hyperkid123 Hyperkid123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hope this won't tank performance 🤞

@Hyperkid123 Hyperkid123 merged commit d150909 into data-driven-forms:state-manager Sep 2, 2020
@rvsia
Copy link
Contributor Author

rvsia commented Sep 2, 2020

@Hyperkid123 yeah, after we implement this and test all possible cases, we can discover more performant solutions.

@rvsia rvsia deleted the prepareRender branch October 7, 2020 09:40
@Hyperkid123
Copy link
Member

🎉 This PR is included in version 3.1.0 🎉

The release is available on

Demo can be found here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released State manager Form state manager packages. Will be used a state management package for the form renderer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants