You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
问题
当一个类(或函数),和
props
不在同一个文件中的时候,props
中的一些参数需要提供给这个类或函数来使用,那么是将整个props
传递过去好一些呢,还是将类改变为接受多个参数,然后分别传递对应的props
好一些呢?写法 1
传递整个
props
写法 2
传递对应的
props
Beta Was this translation helpful? Give feedback.
All reactions