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

<Provider> encapsulation error [4:03am] #21

Closed frankcollins3 closed 12 months ago

frankcollins3 commented 1 year ago

attempting to do: configure @reduxjs/toolkit. photos below show JSX, imports, and browser logs.

error: Screen Shot 2023-07-09 at 4 02 18 AM

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

Screen Shot 2023-07-09 at 4 02 45 AM

part of the problem appears to be that the is wrapping the app but unsuccessfully so

proposed approach: 1: firstly was setting up between App.tsx && Main.tsx. Separating concerns and using just App.tsx now guessing that App.tsx would be for wrapping and state has to be used elsewhere.

frankcollins3 commented 1 year ago

// didn't know we can do this: 👍 import type RootState from "redux/store/rootReducer"

// excerpt:

can import variables as types thats interesting. Makes me wonder how one would do this in regular JS

// also a point in the bucket on things moving towards Typescript. // like GraphQL with typing return data in GraphQLObjectType.

[4:34am]

frankcollins3 commented 12 months ago

App.tsx does not have access to the redux state, the encapsulated components, which for now is