react-detect-offline icon indicating copy to clipboard operation
react-detect-offline copied to clipboard

data layer abstraction or hook

Open marcopeg opened this issue 6 years ago • 4 comments

Hi, this is a nice library, thank you for supporting it.

It would be nice to use the logic behind the component so to update a redux store (or whathever else stuff.

Basically it would really nice if you could provide a hook (as for react hooks) that abstract it :-)

marcopeg avatar Jan 06 '19 11:01 marcopeg

looking into making this a hook :D

chrisbolin avatar Mar 28 '19 03:03 chrisbolin

@marcopeg You can take a look at this, this is the implementation of the reference v3 version https://github.com/geekskai/react-network-detect

geekskai avatar Jun 12 '22 02:06 geekskai

Hello Gan, I like the idea and the readme seems very detailed.

I could not try it out now for I’m traveling and only have my phone with me.

Suggestion: do not include node_modules on your repo. Use .gitignore to skip it.

Idea: could you deliver a running example with CodeSandbox or similar platform?

All the best, Marco

On Sun, 12 Jun 2022 at 04.29, Gan Kai @.***> wrote:

@marcopeg https://github.com/marcopeg You can take a look at this, this is the implementation of the reference v3 version https://github.com/geekskai/react-network-detect

— Reply to this email directly, view it on GitHub https://github.com/cwise89/react-detect-offline/issues/22#issuecomment-1153050693, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADIMMOPIUHOZBJVLSOCDTDVOVDSDANCNFSM4GOJR5JA . You are receiving this because you were mentioned.Message ID: @.***>

--

Best regards, Marco Pegoraro

m. @.*** C. +46 73 545 1223


This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.

marcopeg avatar Jun 12 '22 06:06 marcopeg

@marcopeg Oh, thank you very much for your suggestion, I ignored node_modules when submitting the code, I have added a CodeSandbox link https://codesandbox.io/s/awesome-lovelace-f9g8lf?file=/src/App.tsx

Happy travelling Gan

geekskai avatar Jun 12 '22 12:06 geekskai