Content deleted Content added
m Reverted edits by 103.149.100.42 (talk) (HG) (3.4.10) |
Tag: Reverted |
||
Line 21:
React can be used as a base in the development of [[single-page application|single-page]] or mobile applications. However, React is only concerned with state management and rendering that state to the [[Document Object Model|DOM]], so creating React applications usually requires the use of additional libraries for routing.<ref>{{Cite news|url=https://medium.freecodecamp.org/integrating-create-react-app-redux-react-router-redux-observable-bootstrap-altogether-216db97e89a3|title=How to integrate create-react-app with all the libraries you need to make a great app|last=Dere|first=Mohan|date=2018-02-19|work=freeCodeCamp|access-date=2018-06-14}}</ref><ref>{{Cite web|url=https://medium.com/about-codecademy/react-router-to-redux-first-router-2fea05c4c2b7|title=React Router to Redux First Router|last=Samp|first=Jon|date=2018-01-13|website=About Codecademy|access-date=2018-06-14}}</ref> React Router<ref>{{Cite web|url=https://reacttraining.com/react-router|title=React Router: Declarative Routing for React|website=ReactRouterWebsite|language=en|access-date=2019-10-23}}</ref> is an example of such a library. And also large and complicated applications are required to make AJAX calls to fetch or mutate data. You can use any library you like with React such as Axios, JQuery AJAX or the browser built-in window.fetch. <ref>{{Cite web|title=AJAX and APIs – React|url=https://reactjs.org/docs/faq-ajax.html|access-date=2021-03-08|website=reactjs.org|language=en}}</ref>
==
The following is a rudimentary example of React usage in HTML with [[React (JavaScript library)#JSX|JSX]] and JavaScript.
<syntaxhighlight lang="html" line="1">
|