DropdownToggle unknown prop warning#220
Conversation
React throws unknown prop warning when using the tag prop. This was due to the tag prop being set twice in the render method. I added componentWillMount in order to evaluate the tag prop before the component is rendered. I also removed the de-structured props variable.
|
First, thanks for find this! EDIT |
|
I see what you mean. The easy fix would be to change const to let on props de-structure or evaulate the tag prop again. Would that be preferred to evaluating the tag prop in componentWillMount method? I see you are already fixing the issue. Should I stop on my pull request? |
|
Yes, you can close this. The change was simple (1 liner + a test to ensure there is no regression) after further analyzing the code and issue to determine the intent of setting the tag that way. |
|
fix released in 3.9.0 |
React throws unknown prop warning when using the tag prop. This was due to the tag prop being set twice in the render method. I added componentWillMount in order to evaluate the tag prop before the component is rendered. I also removed the de-structured props variable.