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

Removed props from Bridge.getProps #1206

Merged
merged 1 commit into from
Jan 10, 2023
Merged

Removed props from Bridge.getProps #1206

merged 1 commit into from
Jan 10, 2023

Conversation

radekmie
Copy link
Contributor

In this pull request, I removed the second argument from Bridge.getProps, which is the same as we did with getInitialValue in #1185. The immediate benefit is that it becomes memoizable (and thus yields better performance), but also it wasn't really used for anything else than the options/allowedValues+transform handling, which we'll move to the components anyway via #806. (If you'll read the tests I removed you'll see they weren't really helpful.)

@radekmie radekmie added this to the v4.0 milestone Dec 27, 2022
@github-actions github-actions bot added Area: Bridge Affects some of the bridge packages Area: Core Affects the uniforms package Bridge: GraphQL Affects the uniforms-bridge-graphql package Bridge: JSON Schema Affects the uniforms-bridge-json-schema package Bridge: SimpleSchema Affects the uniforms-bridge-simple-schema package Bridge: SimpleSchema (v2) Affects the uniforms-bridge-simple-schema-2 package Bridge: Zod Affects the uniforms-bridge-zod package labels Dec 27, 2022
@codecov
Copy link

codecov bot commented Dec 27, 2022

Codecov Report

Merging #1206 (daae4b7) into master (e9c8ab6) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1206      +/-   ##
==========================================
- Coverage   98.41%   98.39%   -0.03%     
==========================================
  Files         231      231              
  Lines        3789     3795       +6     
  Branches      998      994       -4     
==========================================
+ Hits         3729     3734       +5     
  Misses          6        6              
- Partials       54       55       +1     
Impacted Files Coverage Δ
packages/uniforms/src/Bridge.ts 100.00% <ø> (ø)
...kages/uniforms-bridge-graphql/src/GraphQLBridge.ts 100.00% <100.00%> (ø)
...niforms-bridge-json-schema/src/JSONSchemaBridge.ts 97.67% <100.00%> (-0.59%) ⬇️
...-bridge-simple-schema-2/src/SimpleSchema2Bridge.ts 100.00% <100.00%> (ø)
...rms-bridge-simple-schema/src/SimpleSchemaBridge.ts 97.70% <100.00%> (+0.02%) ⬆️
packages/uniforms-bridge-zod/src/ZodBridge.ts 100.00% <100.00%> (ø)
packages/uniforms/src/useField.tsx 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@radekmie radekmie merged commit 8bb920f into master Jan 10, 2023
@radekmie radekmie deleted the memoizable-get-props branch January 10, 2023 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Bridge Affects some of the bridge packages Area: Core Affects the uniforms package Bridge: GraphQL Affects the uniforms-bridge-graphql package Bridge: JSON Schema Affects the uniforms-bridge-json-schema package Bridge: SimpleSchema (v2) Affects the uniforms-bridge-simple-schema-2 package Bridge: SimpleSchema Affects the uniforms-bridge-simple-schema package Bridge: Zod Affects the uniforms-bridge-zod package
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants