Templete engine vs ReactJs - reactjs

I have a question about templting engines and ReactJs. First of i'm a beginner to web development and I don't know a lot but hopefully you will get the point. Can I use React and not any other templeting engine to render pages from the server?
any help would really be appreciated.Thanks

React is a javascript library for building UI (https://reactjs.org/).
And because it is in javascript, the pages will be rendered in client side.
You don't need a template engine when you work with React.

Related

Using both Django template and React

Hi guys I’m trying to bulid a website which django works as an rest-api and react works as a front side. I manage to do the whole thing just fine and about to deploy it using aws. But there is one thing I couldn’t really get. Inside my django project I have an app that uses only django template to render things to front. And other apps are working only as apis to get and post things via react. Is it possible to deploy this kind of structure without any special options? I searched internet for a while but I couldn’t really find an example that fits my situation. Thanks!
Yes, you should be able to deploy it without extra options: you can have one Django template view to host the React app entry point, and the rest would be Rest API views that are accessed by React.

How to add existing react js app to saleforce?

I have a react js app built long time ago that uses 3rd party libraries and APIs, now I want to add this app to saleforce. Is there a way to add the existing react js app or do I have to build a new app using the saleforce development tools? Any advise and help is appreciated.
Can you live in an iframe? There's lightning:container tag that could help you. Search questions or blogs that mention it, on SO and on dedicated https://salesforce.stackexchange.com/. Iframe sounds meh but there are ways for it to communicate with parent ("canvas apps" in documentation - and it has nothing to do with <canvas> tag), silently log in to SF, use REST API...
You could try to rewrite your app to native Aura/LWC but you won't be able to call APIs directly from JS. You'll have to pass through SF server-side language called Apex. Which is doable but more for you to learn. There are some more restrictions, although light DOM and LWS help with these, many things Locker service blocks are OK in LWS.
There's also hybrid approach with loading your app as a library?

Does React use server-side-rendering or client-side-rendering?

In an article I read that
React uses server-side rendering.
But in another articles I came across this:
Client-Side-Rendering is a relatively new approach to rendering
websites, and it didn't really become popular until JavaScript
libraries started incorporating it into their style of development.
Some notable examples are Vue.js and React.js
Now Which statement is correct?
When I use create-react-app and run npm start, it seems to me that React uses the Client-Side-Rendering. isn't it?
It’s client side. But React, like some other client side libraries, can be used on the server to prerender it with node, usually for SEO.
Out of the box it renders on the client side.
But, if you have a requirement to render pages on a server, you can achieve this with:
Next.js or
Hypernova or any other tool (there is a bunch of them nowadays!)
Note, that SSR will require a bit more experience than a regular React app.
The main goal of this approach is to allow search engine robots crawl information form web pages(SEO).
create-react-app uses client side rendering by default. There are some tools like next js and gatsby js which pre-render pages on the server side. You can also do Server Side Rendering from scratch.
A few years on from the last answer, it is now quite difficult to implement a client-only React app - serving it on Node is trivial and absolutely what it expects, trying to use it as a client library with other server-side support is more of a challenge and documentation about how to do this is patchy and much of it out of date.

building blog using react.js and express.js

I am a web developer tries to learn React.js. I am thinking about a blog for my first React project. Based on articles and tutorials I have read in the past few days, I am thinking about to use Node.js, Express.js and MongoDB for my server side and React.js for the front-end. Before I start, I want to be clear on few questions I have.
Are those enough to build a blog? Can React.js be used for UI without other template library such as Handlebars?? I have seen few articles using both React and Template engine and confused if I am going to need another template engine.
Can I use Json as communication method(Restful API) between the UI and the server?
Yes for all. But I suggest to use Redus(or Flax) to control all states.

Previewing react-native views using ReactJS in a web browser

(Disclaimer: I'd have asked this question in a forum but the react-native website encourages us to ask it on SO.)
Is there a known tool to visually preview xml layouts in a browser? I'm developping a scaffolding tool to generate basic templates so I can prepare applications for customers quicker, and I'd like it to be a web app. Since the layout is very similar between react-native and reactJS, I'd think the effort to show a react-native layout as a reactJS layout is minimal?
A framework for building web apps with React Native compatible API
https://github.com/taobaofed/react-web

Resources