S
S
shvets22019-04-17 23:33:36
React
shvets2, 2019-04-17 23:33:36

Using React in a non-SPA?

Hello. Interested in the experience of using React components in non-SPA. For example, on a regular multi-page site with backend technologies (and more specifically, on a site that is made on Django).
There is little experience in implementing Vue in this format (each page had index.js where components were imported and registered there and then became available in Django templates via the v-example-component tag and data was transferred there using attributes for Vue: : prop ="{{ value}}").
How to use this with React? Does anyone have experience or ideas?
PS: if someone has a question "Why then Vue / React in this format" I will answer right away - for the sake of reactivity and event handling. Well, for the sake of breaking the code into components, which is convenient in itself.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Robur, 2019-04-18
@shvets2

just like vue.
connect js in which the initialization of the react - application in the desired container.
Data can be transferred there in different ways, I would just put some kind of global object in js.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question