izanami icon indicating copy to clipboard operation
izanami copied to clipboard

use React new Context API

Open gpoulet opened this issue 6 years ago • 7 comments

gpoulet avatar Feb 26 '19 16:02 gpoulet

I'm willing to rework the react client for an up-to-date API, with the newer Context API and some custom hooks if you want.

Are there any needed features ? I've seen caching in other issues, are there any specifics ? Should a cache invalidation purge everything, or just a path ?

jtanguy avatar Dec 01 '20 16:12 jtanguy

That would awesome ! For the cache feature, at the moment you have a sort of cache if you use a router. You have the choice to call the server on the page change or keep data. I think that keeping the same data during a session is ok but not more.

larousso avatar Dec 02 '20 13:12 larousso

Is it possible to have a chat about about the react client features ? I have a POC of the react client using hooks, it is quite smaller compared to the current implementation. However, there are some obscure or undocumented features that I don't really understand: multiple providers, the possibility to provide an array of paths in the feature component, etc.

I would not want to break these features if they are useful for some

jtanguy avatar Dec 30 '20 17:12 jtanguy

Hi, we could talk about that next week, i'am on holiday right now.

larousso avatar Dec 30 '20 17:12 larousso

Hello Julien,

I don't think the array of path is used anymore.

Anyway, something like that would do the job : const feature1 = useFeature("path1"); const feature2 = useFeature("path2");

...

{ feature1 && feature2 && <SomeComponent ... /> }

Regards,

Gauthier

Le mer. 30 déc. 2020 à 18:05, Julien Tanguy [email protected] a écrit :

Is it possible to have a chat about about the react client features ? I have a POC of the react client using hooks, it is quite smaller compared to the current implementation. However, there are some obscure or undocumented features that I don't really understand: multiple providers, the possibility to provide an array of paths in the feature component, etc.

I would not want to break these features if they are useful for some

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MAIF/izanami/issues/227#issuecomment-752692037, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOLAZRDAUW67CKYL5AMIV3SXNMVXANCNFSM4G2KHLPA .

gpoulet avatar Dec 30 '20 17:12 gpoulet

Hi, how far did this get?

StevenTew avatar Nov 11 '21 09:11 StevenTew

I had a POC at some point, but I probably lost it. I remember that the core features were quick to implement. My main concerns at the time were user context (to provide context for A/B and some custom strategies) and #488.

jtanguy avatar Nov 18 '21 13:11 jtanguy