I document my reproduction of tic-tac-toe tutorial of React and I don't understand why parameters of my function are displayed as boolean values (with JSDocs) whereas it is not the case.
This is what appears when I hover the function with cursor : View with IntellijSense of the function
Here is the code of my function :
/**Return the game board.
*
* @param {boolean} xIsNext Allows to show a text that tell which player is the next.
* @param {string[]} squares The current board which will be update at the next action.
* @param {*} onPlay A function that allows to re-render the board.
* @returns the JSX structure of the board.
*/
function Board({xIsNext, squares, onPlay}) {
// ...
}
Is it the fact that it's in curly braces ? Or it is the presence of React ? Or an another reason ?
Cause the
Boardcomponent takes a single-props argument. Not multi paramIt would be best if you defined a type for
BoardPropslike this