Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // To avoid such constructions:
- const props = {
- name: 'John',
- values: [],
- };
- <SettingBankAccount { ...{ ...props, values: ['dd'] } } />
- // Better:
- const defaultProps = {
- name: 'John',
- values: [],
- };
- const props = {
- ...defaultProps,
- values: ['dd'],
- }
- <SettingBankAccount { ...props } />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement