Simple Task for React Expert

Job ID: 33227091

Budget: $10 – $20 USD

We're looking for React experts for long-term collaboration on a major project.

To help identify suitable candidates, here is a simple task we'd like you to solve:

Inside a redirect.tsx file, create 3 variables:

const x = "111";
const y = "222";
const z = "333";

Have the page post the 3 variables and redirect to an external result.php file.

Upon redirect, the 3 variables will be displayed on the result.php file but the posted url will not contain the parameters (true POST, not GET passing of variables).

The posting/redirect will be triggered by programmatically clicking a hidden button, not upon page load.

We will test this by incorporating your code into a more complex react page that evaluates 3 conditions, and will trigger the above posting/redirect only when the 3rd condition is achieved.

If you have serious experience with React, you will know immediately how to solve this.
Related categories: PHP JavaScript React.js Typescript