Hi there, I would like to use the ReactJS Framework in some of my upcoming projects. Does anyone know a good way to use react whilst maintaining a good performance with the script?
Thank you
What seems to be the issue? It works great for me, just compile it and add it.
Hi there, there is no actual problem, just not quite sure how to set the project up and compile with it
Compile the project by npm build or whatever.
And then add it to like an HTML folder and in your fxmanifest you will want to add all the compiled files and the main HTML file.
ui_page "client/build/index.html"
files {
'client/uisrc/build/**/*'
}
You can listen for events as you normally would in a normal UI in your JS file; inside the component.
I am using React in my projects using this boilerplate, it’s built for using react in fivem with some nice utility. Performance isn’t really a concern as long as you write good code.
Thank you, I tried using the boilerplate as instructed however, this seemed not to work
.
Do you have any idea of how I can set up my own project using React? Without the need for a boilerplate
I used React for one of my projects, I let you try to get inspired.
NextCitizens/ncs_core: A powerful, optimized but above all open-source FiveM RolePlay core. Created by the community, for the community. (github.com)
1 Like