Friday, 27 December 2019

jsx if statement inside return

https://reactjs.org/docs/conditional-rendering.html
https://react-cn.github.io/react/tips/if-else-in-JSX.html
https://stackoverflow.com/questions/40477245/is-it-possible-to-use-if-else-statement-in-react-render-function

above should tell you all possible ways to do that.

simple A is that you cannot do if  in jsx return.



No comments:

Post a comment