I have a component that i need to pass props into while being rendered using the Route component. The problem is that typescript disallows lambda functions in JSX and i just can't figure out how to rewrite this into an allowed function:
<Route
key={index}
exact={true}
path={item.urlAddress}
render={() => <DocumentView data={data} />}
/>
I tried this, but it is still being evaluated as a lambda, don't know why:
render={function() { <DocumentView /> }}
Anyone knows how to rewrite it?
Edit: I know this is a linter issure, and i'm looking for the proper way to write this according to ts-lint standards. I know i can add a rule exception, but i want to know how to do this the "proper" way, not adding exceptions every time i encounter a linting problem