Check out example codes for "sfml default program". It will help you in understanding the concepts better.

Code Example 1

int main()
    sf::RenderWindow window(sf::VideoMode(800, 600), "My window");

    // run the program as long as the window is open
    while (window.isOpen())
        // check all the window's events that were triggered since the last iteration of the loop
        sf::Event event;
        while (window.pollEvent(event))
            // "close requested" event: we close the window
            if (event.type == sf::Event::Closed)

    return 0;

Learn ReactJs, React Native from