frankcollins3 / Next-Water-App

Happy, Healthy Water Cycling App that tracks user/human fluid intake.
https://next-water-app.vercel.app
1 stars 0 forks source link

inaccurate auto correct from @reduxjs/toolkit && rootReducer [4:20am] #22

Closed frankcollins3 closed 1 year ago

frankcollins3 commented 1 year ago

attempting to do: config @redux/toolkit

error: redux/store/rootReducer: 👍 HYDRO_SETTINGS components/webpage/main.tsx: 👎 hydroSettings

Screen Shot 2023-07-09 at 4 22 24 AM

Screen Shot 2023-07-09 at 4 19 51 AM

proposed approach: dig again config again

frankcollins3 commented 1 year ago

👍 App.tsx {RootState} works: Screen Shot 2023-07-09 at 4 24 21 AM

👎 Main.tsx {RootState} returns definability error Screen Shot 2023-07-09 at 4 24 09 AM

error: Module '"redux/store/rootReducer"' has no exported member 'RootState'. Did you mean to use 'import RootState from "redux/store/rootReducer"' instead?ts(2614) import RootState No quick fixes available

I change the declaration of RootState to remove importing as an object. import RootState from "redux/store/rootReducer"

Now the error mentions "used as value. did you mean typeof ?" when handling RootState in useSelector

Screen Shot 2023-07-09 at 4 26 16 AM

[4:27am]

frankcollins3 commented 1 year ago

👍 could share all 3 blocks of code but got it figured out. {RootState} was the problem [10:08pm]