Richardson
Richardson

Reputation: 2285

Is there an issue using .tsx file as slice instead of .ts in redux toolkit?

I have a initial state that has some jsx elements inside of it, my other slices are .ts but I had to change this one to .tsx in order for it to be compatible with my jsx state elements? Could this be a bad thing to do?

I am refactoring from context and in context it was tsx but I am afraid it could be an anti pattern regarding redux tool kit.

enter image description here

Upvotes: 0

Views: 331

Answers (1)

phry
phry

Reputation: 44136

No, it doesn't matter at all. The only difference is that you now could write JSX in there, which doesn't make a whole lot of sense - but also doesn't hurt.

Upvotes: 2

Related Questions