В момент создании React.js в файлах есть index.js и index.html, и всё что пишешь в index.js то это отправляется на div с id-root. Но только работает с index.html. У меня есть ещё несколько страниц например films.html и как мне сделать чтобы там работать с React???
5/20/2022 3:12:45 PM
Դանիել Գրիգորյան10 Answers
New AnswerԴանիել Գրիգորյան this is your question, right? At the time of creating React.js, the files have index.js and index.html, and everything you write in index.js is sent to the div with id-root. But only works with index.html. I have some more pages like films.html and how can I make it work with React??? You can create a div with id 'root ' in film.html file, if you no longer need index.html make sure you delete the root id in index.html
Index.html моя главная страница, но есть ещё и другие страницы, и я хочу использовать во всех страницах. Например на films.html, person.html, comics.html. но я не могу просто "root" подключать их, потому что так не работает.
Can you write the film.html in javascript as a component and then import it to your main render ?
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message