aws / graph-explorer

React-based web application that enables users to visualize both property graph and RDF data and explore connections between data without having to write graph queries.
https://github.com/aws/graph-explorer
Apache License 2.0
299 stars 46 forks source link

Use Recoil instead of ConfigurationContext #423

Closed kmcginnes closed 1 month ago

kmcginnes commented 1 month ago

Description

In React, systems like Recoil provide better semantics and performance than contexts and providers. Since useConfiguration() is used everywhere I'm moving it to Recoil.

The config object is still a big ball of a bunch of things (i.e. the connection, the schema, the user styles, etc). Most views and logic only need a small part of that. Over time I'll use a more targeted form of Recoil state for those places. But this PR is not that change. This is just a stepping stone toward that future.

[!NOTE]

I left the folder called /ConfigurationProvider/ because I couldn't think of a better name. There is no more React provider in that folder, but it is still providing the configuration, in a manner of speaking.

I didn't want to change its name to something Recoil specific. And I didn't want to move the folder any where else since there were other helpers in there. So I am just kicking the can down the road to future me to deal with.

Validation

Related Issues

Check List