Last post Sep 11, 2019 09:50 AM by EnenDaveyBoy
Sep 07, 2019 12:56 PM|EnenDaveyBoy|LINK
after setting up react with the build in hooks it appears redux doesn't support cross tab state out of the box, so i am going to need middle ware and I am looking for recommendations, i am also going to do things like remember the user is there are any recommendation
for middleware which does this it would also be appriciated.
Will i still be able to use react hooks using the middleware or will have have to use the middleware components?
Sep 07, 2019 04:48 PM|bruce (sqlwork.com)|LINK
Sep 07, 2019 08:51 PM|EnenDaveyBoy|LINK
the remember me was an after thought tbh.
i thought state would be shared accros tabs, so if i had two the same form in multiple tabs i would have to allow my state to accomodate that, if i wanted to store using information like time and culture codes i would get it and store it once across all
back to this framework thing, i am using useDispatch and useSelector which are from 'react-redux' so i guess i am using redux hooks, need to keep reminding myself.
Sep 07, 2019 09:00 PM|EnenDaveyBoy|LINK
after getting other replies i think i can just get all the errors outside the loop and travse through them in another function which would be inside the loop,i thought it was like a database when you only want to return 1 record but i am getting use to it
being 1 object
Sep 10, 2019 04:59 PM|bruce (sqlwork.com)|LINK
Sep 10, 2019 08:02 PM|EnenDaveyBoy|LINK
thanks will take a look.
Have looked a little at hoc's is it a bit like abstract functions in c#? or am i miles off? i haven't found a reason to use them yet but i haven't done anythingcomplicated yet.
Sep 11, 2019 04:10 AM|bruce (sqlwork.com)|LINK
HOC's are key to functional programing, and code reuse. in redux connect() is used to create a HOC from any react component. almost any react form package will use HOC's to enhance the react input components.
to get very far in react you should understand HOC's. there are a some caveats to using HOC's with react components (due to property management). Hooks are technique to avoid HOC's in may cases.
read this on HOC and hooks:
Sep 11, 2019 09:50 AM|EnenDaveyBoy|LINK
thanks for the info, i get what HOC's are a the basic level, I also get what hooks are on a basic level, but think I am miles off full understanding them.
i think i need to find some more complicated examples and implement them to understand it fully.
thanks for all the help.