I decided to remove all Immutable code on our big project because it wasn't causing our React to render less (using selectors on our redux layer was actually better).
Since our project has tests to check if everything is still working, I was able to achieve that with the following steps:
Search on all files on vscode or any editor with Use Regular Expression
option (command+alt+r on vscode):
(Immutable|\.(size|count\(|toJS(?!\w)|fromJS(?!\w)|first[\(\)]|get\(|set\(|findEntry\(|getIn\(|setIn\(|contains\(|delete\(|asImmutable|add\())
Then on each find that was actually from a Immutable code:
- Remove Immutable imports