Last active
September 22, 2024 19:21
-
-
Save gaearon/6668a1f6986742109c00a581ce704605 to your computer and use it in GitHub Desktop.
Add React in One Minute
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Add React in One Minute</title> | |
</head> | |
<body> | |
<h2>Add React in One Minute</h2> | |
<p>This page demonstrates using React with no build tooling.</p> | |
<p>React is loaded as a script tag.</p> | |
<!-- We will put our React component inside this div. --> | |
<div id="like_button_container"></div> | |
<!-- Load React. --> | |
<!-- Note: when deploying, replace "development.js" with "production.min.js". --> | |
<script src="https://unpkg.com/react@18/umd/react.development.js" crossorigin></script> | |
<script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js" crossorigin></script> | |
<!-- Load our React component. --> | |
<script src="like_button.js"></script> | |
</body> | |
</html> |
Is it possible to implement the same logic , but for an react-native application ?
yes I think so
I have a question guys, what if I created another component and I want to call it or import it inside like_button.js how to do that?
use like this:
<div> {*/ mandatory for react if you r clubbing more than one adjacent JSX
elements/*}
<div>
<h1>Amazing scientists</h1>
<ProfileS /> {*/ component 1 /*}
<ProfileS /> {*/ component 1 /*}
<ProfileS /> {*/ component 1 /*}
</div>
<div>
<ProfileS /> {*/ component 1 /*}
<Pile /> {*/ component 2 /*}
</div>
<div>
<Pile /> {*/ component 2 /*}
</div>
</div>{*/ mandatory for react /*}
…On Thu, Feb 9, 2023 at 1:00 PM Exequiel V. ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
I have a question guys, what if I created another component and I want to
call it or import it inside *like_button.js* how to do that?
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/6668a1f6986742109c00a581ce704605#gistcomment-4465121>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AP3CCXQ6KRVNAFN2BNVP4X3WWSMK7BFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFQKSXMYLMOVS2I5DSOVS2I3TBNVS3W5DIOJSWCZC7OBQXE5DJMNUXAYLOORPWCY3UNF3GS5DZVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVA4TAMZVGE3TENNHORZGSZ3HMVZKMY3SMVQXIZI>
.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
I tried to import a component using react cdn but I cand import it, I posted the problem in stack overflow. https://stackoverflow.com/questions/75375157/how-to-import-my-component-using-reactjs-cdn?noredirect=1#comment133002007_75375157
Great
thanks
jsfiddle demo but without the js url component but direct inside the javascript:
https://jsfiddle.net/onigetoc/ua2hoqm1/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Really helpful thanks alot