Context Matters - abukhalil-LTUC-ASAC/amman-401d4 GitHub Wiki

Context does matter

In react, this piece of work allows you to bypass all children till the very end to use any information, but only to the children of a provider block, and multiple provider blocks could exist and have exclusive content but why would you do that?

Now the fun part involves trying to manipulate the state context variables from the children upwards. This, in hindsight, was best used with react hooks instead of normal functions passed down as I have just discovered. Using reducer with context reduces the amount of code needed to handle state changes and allows useEffect() blocks to detect it automatically.

Regarding context hell

Any hell of type, you might encounter irl or at code, usually involves complexities and over engineered work. This specific hell could be well understood through this GitHub issue, just grab some popcorns while analyzing what went wrong and how was it fixed.

It is generally said, context providers can be nested, and be exclusive but generally should not be so! ProviorPack is the solution to go with.

Cookies and such

This part is totally about functionality and connection with the backend and should be explored in technicality and implementation.